Validate user has access to the cube. Args: user_id (str): The user ID to validate. cube_id (str): The cube ID to validate. Raises: ValueError: If user doesn't have access to the cube.
(self, user_id: str, cube_id: str)
| 212 | ) |
| 213 | |
| 214 | def _validate_cube_access(self, user_id: str, cube_id: str) -> None: |
| 215 | """Validate user has access to the cube. |
| 216 | |
| 217 | Args: |
| 218 | user_id (str): The user ID to validate. |
| 219 | cube_id (str): The cube ID to validate. |
| 220 | |
| 221 | Raises: |
| 222 | ValueError: If user doesn't have access to the cube. |
| 223 | """ |
| 224 | # First validate user exists |
| 225 | self._validate_user_exists(user_id) |
| 226 | |
| 227 | # Then validate cube access |
| 228 | if not self.user_manager.validate_user_cube_access(user_id, cube_id): |
| 229 | raise ValueError( |
| 230 | f"User '{user_id}' does not have access to cube '{cube_id}'. Please register the cube first or request access." |
| 231 | ) |
| 232 | |
| 233 | def _get_all_documents(self, path: str) -> list[str]: |
| 234 | """Get all documents from path. |
no test coverage detected