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 ACL field to rooms #3929

Closed
wants to merge 9 commits into from
Closed

Conversation

pferreir
Copy link
Member

@pferreir pferreir commented May 15, 2019

Kapture 2019-05-20 at 10 50 15

Copy link
Member

@ThiefMaster ThiefMaster left a comment

Choose a reason for hiding this comment

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

I didn't look closer into some of the functions yet - just a bunch of things I noticed when having a quick look over the code.

indico/web/client/js/react/components/principals/hooks.js Outdated Show resolved Hide resolved
indico/web/client/js/react/components/principals/hooks.js Outdated Show resolved Hide resolved
indico/web/client/js/react/components/principals/hooks.js Outdated Show resolved Hide resolved
indico/web/client/js/react/components/principals/hooks.js Outdated Show resolved Hide resolved
indico/core/permissions.py Outdated Show resolved Hide resolved
indico/core/permissions.py Outdated Show resolved Hide resolved
indico/util/marshmallow.py Outdated Show resolved Hide resolved
indico/modules/rb/blueprint.py Outdated Show resolved Hide resolved
indico/modules/rb/client/js/common/rooms/RoomEditModal.jsx Outdated Show resolved Hide resolved
indico/util/marshmallow.py Outdated Show resolved Hide resolved
indico/util/marshmallow.py Outdated Show resolved Hide resolved
indico/web/client/js/react/components/principals/util.js Outdated Show resolved Hide resolved
indico/web/client/js/react/components/principals/util.js Outdated Show resolved Hide resolved
@pferreir pferreir force-pushed the room-acl-field branch 3 times, most recently from 71f3186 to 84b42d4 Compare May 17, 2019 09:38
@ThiefMaster
Copy link
Member

ThiefMaster commented May 17, 2019

What about removing the entry when removing the last permission? The unclickable (x) when there's just a single permission is a bit weird.

Or it could be greyed-out (and excluded from the value) sinc, but that'd add some extra complexity because you'd need to keep track of this in local state unless you just ignored empty entries on the server side (that'd already get rid of them after submission). But having this kind of transient state would also be convenient when adding someone new since you wouldn't need to assign some permission immediately.

@ThiefMaster
Copy link
Member

ThiefMaster commented May 17, 2019

Something in the value isn't 100% consistent. When I add a new permission and remove it again, the save button doesn't get disabled again, so the old/new value aren't equal.

Edit: Looks like it;s just missing isEqual={_.isEqual} on the <FinalField> (maybe it'd be best to provide a FinalACL component that takes care of it like I did for the PrincipalField)

@pferreir
Copy link
Member Author

What about removing the entry when removing the last permission? The unclickable (x) when there's just a single permission is a bit weird.

Or it could be greyed-out (and excluded from the value) sinc, but that'd add some extra complexity because you'd need to keep track of this in local state unless you just ignored empty entries on the server side (that'd already get rid of them after submission). But having this kind of transient state would also be convenient when adding someone new since you wouldn't need to assign some permission immediately.

Already suggested by @mic4ael 😉 , but thanks!

@pferreir
Copy link
Member Author

Something in the value isn't 100% consistent. When I add a new permission and remove it again, the save button doesn't get disabled again, so the old/new value aren't equal.

Edit: Looks like it;s just missing isEqual={_.isEqual} on the <FinalField> (maybe it'd be best to provide a FinalACL component that takes care of it like I did for the PrincipalField)

Solved!

@pferreir pferreir closed this May 23, 2019
@pferreir pferreir deleted the room-acl-field branch May 23, 2019 14:28
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.

None yet

3 participants