Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #OBS-I583 : No access check if rbac is disabled #337

Merged
merged 3 commits into from
Mar 7, 2025

Conversation

JeraldJF
Copy link
Collaborator

@JeraldJF JeraldJF commented Mar 6, 2025

Do not do rbac check for dataset read api if rbac_check is "false"

@JeraldJF JeraldJF changed the base branch from main to release-1.7.0 March 6, 2025 10:12
if (_.lowerCase(config.is_RBAC_enabled) !== "false") {
const user = await userService.getUser({ id: userID }, ["roles", "user_name"]);
const userRoles = _.get(user, "roles");
const hasValidRole = _.some(userRoles, (role: string) => ['dataset_manager', 'admin'].includes(role));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dataset creator also should be able to do this action ?

@HarishGangula HarishGangula merged commit e7538ee into release-1.7.0 Mar 7, 2025
1 check failed
@HarishGangula HarishGangula deleted the read-access-fix branch March 7, 2025 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants