Background

    Permissions, as implemented in MindTouch Deki <= 8.08, were designed to provide the lowest cognitive burden, and as such remain simplified. However, we have the underlying capability in the API to expose a lot more functionality, which would allow for more granular control over content inside Deki.

    Work items

    A permission reboot would involve:

    • New UI - a better screen for managing permissions on a per-page basis
    • Removing the "restriction" abstraction layer - for true per-page granularity, we have to remove these pre-made masks of restrictions
    • Removing the "roles" abstraction layer - the initial reason for roles was to give a set of flags a mask that could be applied and updated with ease across the system. There is a significant overlap currently between roles and groups, and roles seems to be a somewhat foreign concept - I think the notion of user/groups is a lot easier for people to underestand.
    • Allowing granularity with "inherited" permissions - there are use cases where permission inheritance is a bad idea (for example, Moz wants to keep the home-page "read-only", but obviously first-level pages should allow UPDATE ...
    • Expand flags - need more granular flags for attaching files, moving vs. delete, commenting

    Proposed Changes

    New UI

    This is a very very early draft (no design really, still fleshing out the flow). (RoyK: As of 24.09, this UI will not work and must be revamped)

    restrictions.gif

    The idea behind the new UI is that we will display relevant flags to pages and allow setting these first as an overall restriction ("Everyone can"), then allow for specific overrides ("grants"). Users and groups, as always, can have their grants updated.

    Some things I'd like to avoid:

    • A super grid of 50,000 checkboxes
    • Too much technical jargon (my initial reluctant to approach more granular permissions stems from the ambiguity of roles)
    • Hiding the fact that restrictions remove, then grants add (too techie for most people to understand)... the UI should present permissions as purely additive

    Deprecating "Restrictions"

    Proposal: Remove the notion of "Restrictions" from the API and instead use a custom set of flags for each PUT:page/security operation. This will let us drop another unnecessary table, and remove a layer of abstraction from the API.

    The downside to this approach is that we lose the ability the globally define a 'restriction.' This is only really an issue when we add new permission flags, and they need to be retroactively added. However, this can be mollified; if we're adding a new action, then backwards-compat isn't an issue; the restricter has defined a specific set of actions associated to a user - adding new behavior is not a problem. The only problem occurs when we split an existing flag into two separate flags (example: VIEW --> VIEW, COMMENT). I'm not sure how this will be reconciled - (update script?)

    Proposed DB changes

    • Drop `restrictions`
    • Drop `pages.page_restriction_id`
    • Add `pages.page_restriction` which has the bitmask of that page
    • Add `pages.page_restriction_inherit` as a TINYINT(1) which determines whether permissions should cascade (?)

    Deprecating "Roles"

    Roles were initially created to create a quick mask that could be used by the front-end to simplify operations. However, with the addition of local groups, roles are largely redundant to groups, without the flexibility of the 1:many relationship groups offer.

    We can simplify the operations of Deki by remapping all roles functionality to groups. Hence, upon upgrade, the "Contributor" role would be converted into a "Contributor" group, which would maintain the permission masks from that role. 

    This also means that users would have no roles until they were assigned into a group.

    Proposed DB changes
    • Convert all data in `roles` to `groups`
    • Drop `roles`
    • Add new user data into `user_groups`
    • Drop `users.user_role_id`

    Allowing granularity with inherited permissions

    New subpages inhering permissions from the parent is the typical working general case. If a page is somehow protected, child pages shild be auto-protected as well. In some cases as with Mozilla, you don't want child pages to be protected. This can be accomplished simply by not inheriting parent permissions. -> Checkbox

     

    Undo permission change

    Use case introduced by andrewstr here.

    Tag page

    Files 5

    FileVersionSizeModified 
    Viewing 11 of 11 comments: view all
    BROWSE permission is missing
    Posted 05:51, 18 Sep 2008
    Would the ability to restrict extensions make much sense for this enhancement? Or is that already available and I just missed the boat?
    Edit: I just thought about it and realized it would be the mother of all headaches when you consider someone who may not have access to an extension can still be an editor... probably not a good feature to ever try and implement. =) edited 16:05, 19 Sep 2008
    Posted 16:02, 19 Sep 2008
    For page security ideas, you may want to check out the DotNetNuke (DNN) open source portal management system. It's a very simple, easy-to-use model that works. I've attached a screen shot of their settings. While the DNN model is a grid of checkboxes, it only controls view / edit permissions by role. The source code for DNN is available via http://www.dotnetnuke.com - registration is required for download. My firm uses this software to power 80 web sites, and we're always adding new sites.

    For the "removing roles abstraction layer" I suggest that roles are actually more intuitive than groups in this context. So instead of ditching roles, it may be desirable to keep the roles nomenclature and ditch the groups. But, this is a personal preference.

    In my opinion, controlling view / edit permissions at the role level is granular enough. It's a fairly simple model that hopefully is easy to implement. To add additional granularity, adding roles-based security to extensions may be a good idea. The way we're looking at DekiWiki, I can see a clear need to "lock down" some extensions so that only certain users / roles are authorized to add them to a wiki article.

    Thanks for a cool product and for listening :)
    Posted 06:41, 24 Sep 2008
    I've also uploaded a screen shot of DNN's role setup. DNN uses an "auto-assignment" field which tells the system to assign roles marked as "Auto Assignment" to all new users registering on a given portal / site. After registration, only admins can change a user's roles.

    Thanks again.
    Posted 07:01, 24 Sep 2008
    shware: i'm loathe to ditch groups, because they are far more natural than roles. roles is a 1:1 relationship with users, while groups allows a 1:many. furthermore, groups fit in nicely with LDAP groups (so it'd be hard to remove that functionality)
    Posted 12:20, 24 Sep 2008
    shware: i also just chekced out the screenshots - it seems very similar in spirit to what we're doing. unfortunately, it looks like DNN only supports two cases (view + edit), where as we have upwards of 10 possible actions allowed.

    but it looks like both deki and dnn will converge on the same solution in spirit ;)
    Posted 12:21, 24 Sep 2008
    @anbrcyp: restricting extensions is a separate feature. steve has brought it up a few times, but it's nothing actionable yet.
    Posted 12:22, 24 Sep 2008
    Attached a tabbed concept for grant management. It's based on the ideas I had listed in my last post in the forum about permissions. Not a very good mockup, but hopefully it gives a decent visual when you think about it. =)
    Posted 08:10, 27 Sep 2008
    Created and attached a graphviz example of the permission management at the page level. Created a page in my user space covering the ideas of my last forum post. Hopefully the graphviz helps. I'll admit it has some weak points under certain cases, but feel free to use anything that sounds like a good idea. =) [http://wiki.developer.mindtouch.com/User:Anbrcyp/Permissions_Graphviz] Also quick reminder for the 'Accessmap' idea. [http://wiki.developer.mindtouch.com/User:Anbrcyp/Proposal_in_progress_-_Accessmap] edited 19:34, 29 Sep 2008
    Posted 16:32, 27 Sep 2008
    Wow!
    This granular controls is exactly what I need for a long time.
    I still use version 8.08.2_Kilen_Woods. Is this changes already available in newer versions of MT?
    Posted 09:09, 19 Jul 2009
    @jefersonfoliveira yes, the UI for permissions was improved in Lyons (9.02). The most up-to-date build is 9.02.4
    Posted 07:09, 20 Jul 2009
    Viewing 11 of 11 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by