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

Add model card actions #1468

Merged
merged 5 commits into from
Sep 2, 2024
Merged

Add model card actions #1468

merged 5 commits into from
Sep 2, 2024

Conversation

GB27247
Copy link
Member

@GB27247 GB27247 commented Aug 21, 2024

No description provided.

@@ -105,8 +105,9 @@ export class BasicAuthorisationConnector {

// Check a user has a role before allowing write actions
if (
[ModelAction.Write, ModelAction.Update].some((a) => a === action) &&
(await missingRequiredRole(user, model, ['owner', 'mtr', 'msro']))
([ModelAction.Write, ModelAction.Update].some((a) => a === action) &&
Copy link
Member

Choose a reason for hiding this comment

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

For clarity I would probably split this into two if statements/conditions:

  1. For ModelAction.Write that tells the user they don't have permission to update the model card if they don't have one of 'owner', 'mtr', 'msro', 'contributor'.
  2. For ModelAction.Update that tells the user they don't have permission to update the model if they don't have one of 'owner', 'mtr', 'msro'.

@GB27247 GB27247 merged commit 05c1268 into main Sep 2, 2024
14 checks passed
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.

3 participants