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

always add current user to acl #389

Conversation

schuettloeffel-elsa
Copy link
Contributor

Closes #385

@ziegenberg
Copy link
Member

Shouldn't this also be added to app/src/components/users/partials/wizard/AclAccessPage.tsx ?

read: true,
write: true,
actions: [],
});

setFormikFieldValue("policies", template);
setFormikFieldValue("template", templateId);
Copy link
Member

Choose a reason for hiding this comment

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

In app/src/components/events/partials/ModalTabsAndPages/NewAccessPage.tsx we do check the ACLs with await dispatch(checkAcls(formik.values.acls));. Shouldn't we do this here too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dont know, but better make an own issue for that and stick to this issues topic?

@schuettloeffel-elsa
Copy link
Contributor Author

Shouldn't this also be added to app/src/components/users/partials/wizard/AclAccessPage.tsx ?

No, when creating a user the user gets his own role in any case, even when no role was selected. Not sure where this happens, maybe in the backend?

@Arnei Arnei added the type:bug Something isn't working label May 16, 2024
Copy link
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@schuettloeffel-elsa
Copy link
Contributor Author

Hei @ziegenberg, could you have another look into this pr? Would be cool if we could get this to the next release since this is kind of crucial for our oc setup

@ziegenberg
Copy link
Member

Would an admin be able to select an ACL template without being in the list as the current user?

@schuettloeffel-elsa
Copy link
Contributor Author

Would an admin be able to select an ACL template without being in the list as the current user?

Selecting a template would always add your user to the list, but you can off course delete that entry.

Copy link
Member

@Arnei Arnei left a comment

Choose a reason for hiding this comment

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

Works and makes sense to me.

I agree that this does not need to be added to app/src/components/users/partials/wizard/AclAccessPage.tsx. Unlike for events or series, ACL templates have no sense of ownership, meaning users don't need their role in the template to edit it.

@ziegenberg
Copy link
Member

I'm ok with the change, as it adds feature parity with the old Admin UI.

For later reference: This kind of business logic should ideally be placed in the backend and not the frontend. So we do not have to implement this kind of logic in all interfaces again.

@ziegenberg ziegenberg merged commit e76eeb7 into opencast:main May 29, 2024
2 checks passed
@ziegenberg ziegenberg self-assigned this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User can select ACL template and kick himself out the ACL
3 participants