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

Fine-grained permissions sidebar #946

Merged
merged 19 commits into from Dec 7, 2018

Conversation

Projects
None yet
4 participants
@kraenhansen
Copy link
Contributor

kraenhansen commented Sep 13, 2018

This PR is adding a first iteration on the ability to view and edit fine-grained permissions of a reference Realm used for query-based sync.

This will be fixing #683 and realm/realm-studio-private#8.

It adds the following functionality:

  • List and click to edit permissions already added to an object, class or Realm.
  • Add new and remove existing permissions from an object, class or Realm.
  • Click on a role to see, add to or remove from the list of members (this should be virtualized and filterable as it might contain a lot of users).
  • Show when a permission is "shadowed" by a (missing) permission on a higher level.

☝️ the unchecked items has been moved to separate issues.

Initial view with no objects selected

skaermbillede 2018-09-13 kl 15 06 39

Clicking the everyone role

skaermbillede 2018-09-13 kl 15 06 53

Selecting an Item row

skaermbillede 2018-09-13 kl 15 07 09

Hovering over a privilege shows an explanation

skaermbillede 2018-09-14 kl 09 35 21

Clicking a "user role"

skaermbillede 2018-09-13 kl 15 07 19

Selecting a row in a class without object-level permissions

skaermbillede 2018-09-13 kl 15 07 28

For future improvements:

  • List and edit permissions on the Realm-level from the list of Realms accessed via the Server Administration window, instead of within the Realm Browser.
  • Translate user IDs into human understandable information (by pairing it with account information from the __admin Realm).
  • An ability to view permissions from a particular users point of view.
@cmelchior

This comment has been minimized.

Copy link
Collaborator

cmelchior commented Sep 13, 2018

Note that it makes sense to show all privileges at all levels since values set at lower levels are filtered by values at the higher level, e.g. canDelete doesn't have a meaning at the Realm level, but if not set to true there, any value you set at the class level will just be ignored.

@cmelchior

This comment has been minimized.

Copy link
Collaborator

cmelchior commented Sep 13, 2018

Also showing members of a Role the way it is done in the screenshot is dangerous since you can have 1000's of users. We probably need a more advanced popup of some kind, or perhaps just redirect to the __User table with the correct filter enabled (although that would probably also require some nice way to navigate back to the original view).

@bmunkholm

This comment has been minimized.

Copy link
Contributor

bmunkholm commented Sep 13, 2018

You likely considered making the permission view in the buttom of the left bar (as a collapsible view) ?
For the number of permissions on this screen it would be fine. But perhaps not if you have many classes and roles.

@ianpward

This comment has been minimized.

Copy link

ianpward commented Sep 14, 2018

This looks great! Agree with this:

Translate user IDs into human understandable information (by pairing it with account information from the __admin Realm).

Also I think it would be good to translate our internal classes from __Permission to Permission or similar

@kraenhansen kraenhansen force-pushed the kh/object-permission-sidebar branch from 0484a1a to 52a34f4 Dec 7, 2018

@kraenhansen kraenhansen force-pushed the kh/object-permission-sidebar branch from 36e236d to 8cf5ec6 Dec 7, 2018

@kraenhansen kraenhansen merged commit c5e87f9 into master Dec 7, 2018

1 check passed

continuous-integration/jenkins/pr-head This commit looks good
Details

@kraenhansen kraenhansen deleted the kh/object-permission-sidebar branch Dec 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment