WordPress.org

Ready to get started?Download WordPress

Forums

New Plugin: Role Scoper (29 posts)

  1. kevinB
    Member
    Posted 6 years ago #

    Role Scoper is a comprehensive drop-in replacement for capability enforcement and administration in WordPress. Assign reading, editing or administration roles to users or groups on a page-specific, category-specific or other content-specific basis.

    Existing WordPress roles are honored by default, but with Role Scoper can be:

    • supplemented with content-specific role assignment
    • disregarded if a section (category) or object (page/post) is marked exclusive

    Scoped role requirements and assignments are reflected in every aspect of the WordPress interface, from front end content and navigation to administrative post and comment totals. Content administrators control who can view/edit/administer specified content, and what content anonymous users see.

    Section and object roles can be set to propagate to child sections/objects. User groups can be created and assigned roles. Choose whether unqualified front-end content is hidden or replaced with a customizable teaser. The object role assignment UI indicates where users have a role implicitly applied through another blog, section or object role assignment. Other plugin and core developers will be interested in the underlying users_who_can function, made possible by a new roles storage schema.

    The abstract data model and API support additional data sources, object types, capabilities and taxonomies (using term_taxonomy or other custom schema). If your plugin uses the WordPress current_user_can function and supports filtering of its listing query, you can use Role Scoper’s API to define your data source, object types, sections and scopeable roles. These will supplement any other assigned roles; there is no need to merge all capabilities into one all-inclusive role.

    Role Scoper is currently a public beta release.

  2. MichaelH
    Member
    Posted 6 years ago #

    @kevinb

    Sounds like a pretty awesome plugin!

    Do I understand correctly that the plugin could replace plugins such as the ones you mentioned -- Limit Categories, Category Visibility, Post Levels, Restrict Pages, Disclose Secret, WP-Group-Restriction, and Role Manager?

    Thanks.

    Just a few more restriction plugins for info:
    Custom Query String Reloaded
    Advanced Category Excluder
    Hide Pages
    Simple Exclude
    Front Page Excluded Categories
    Exclude Pages
    Front Page Cats
    Just One Category
    User:MichaelH/Plugins/Restriction

  3. kevinB
    Member
    Posted 6 years ago #

    @MichaelH,

    Based on my last knowledge of the first six plugins you listed (early 2007), Role Scoper is a candidate to replace them, or at least their major functions. A minor exception would be the "group page" setting in WP-Group-Restriction, which I have not emulated thus far. There may be other features I am not aware of in the other plugins, but I did design Role Scoper to replace them all in my own WordPress CMS implementations.

    At present, Role Manager and Role Scoper can supplement each other.

    Role Manager defines comprehensive roles for blog-wide assignment. This is the "WP" role by which the WordPress core ranks a user. A "WP" role is comprehensive in that WP expects all capabilities a user needs for any operation to come from that one role.

    Role Scoper (or plugins which make use of its API) define supplemental roles for blog-wide, term-wide or single-object assignment. These "RS" roles should each include capabilities for only one object type. If a term or object is set to require RS role assignment for some role, any corresponding WP blog role assignment is ignored. (i.e. You can configure a category such that WP Editors can't post to it unless they have a Post Contributor/Author/Editor role assigned for that category.) Otherwise, WP and RS roles will supplement each other in satisfying capability requirements. (i.e. You can enable a WP Contributor to edit some page by assigning the Page Editor role for that page - with an option to propagate that same role for subpages).

    So, to summarize, Role Scoper will coexist with Role Manager by
    * defining additional, supplemental roles (including blog-wide)
    * filtering the application of "regular" WP blog roles for certain content

    I chose not to go all the way and provide WP blog role definition and assignment because I don't know where the WP core role storage schema is headed and prefer to treat it as a black box at this point.

    Let me know if this raised any more questions.

    - Kevin

  4. magicien
    Member
    Posted 6 years ago #

    Hi Kevin,

    Seems great!
    I was using Disclose Secret, but since the update to WP2.5.1, it doesn't work anymore!!!

    So, I tried to install your plugin, but, at the very beginning (when I try to activate), I ha ve a parse error saying :
    "Parse error: parse error, unexpected '=', expecting ')' in /var/www/vhosts/MYDOMAIN/subdomains/preview/httpdocs/wordpress/wp-content/plugins/role-scoper/role-scoper_main.php on line 336"

    I've searched a bit, at this line, there is a function starting.

    "function get_strict_terms($taxonomy, $cols = COL_ID_RS, $term_id = '', &$arr_all_terms_count = '', $args = '') {"

    With comments just above.

    Thanks,

    Julien

  5. kevinB
    Member
    Posted 6 years ago #

    Thanks to magicien for reporting this error. It is a PHP4 issue, and now corrected in version 0.9.2. Go to http://agapetry.net for the release notice and download.

    My apologies to any other PHP4 users stung by this bug.

    The revision also restores the Post Reader/Contributor/Editor UI, which was being suppressed in the post edit form (regardless of PHP version).

    - Kevin

  6. magicien
    Member
    Posted 6 years ago #

    That is was I call Reactivity!!!
    I download, try and tell you back!

    Thanks

  7. magicien
    Member
    Posted 6 years ago #

    So,

    It works well (no error, all options are here!)

    But, my question :

    what I want to do is to give access to some pages to groups (Suscribers, authors...).
    The problem is that Role Scoper do not include these groups and I have to create them again and assign users.

    I don't know if i'm clear (!!), but in fact, I just want to use existing groups... The groups tab doesn't display my groups :(

    But, I would like to thank you! You did a great job!!!

    Julien

  8. kevinB
    Member
    Posted 6 years ago #

    Julien,

    The "Groups" you refer to actually correspond to WordPress roles.
    I'm afraid setting a "required role" for each page in the way you describe would complicate/convolute the model for those who want to define user groups apart from WP roles.

    But what if I added a "Create Group from WP Roles" utility in groups admin? If one click could create a Group corresponding to any selected WP role, would that be easy enough?

    - Kevin

  9. magicien
    Member
    Posted 6 years ago #

    Yes It would be enough... If Role Scoper groups are synchronized (or redirect to) whith WP groups.

    Thanks!

  10. magicien
    Member
    Posted 6 years ago #

    Any news for this lovely plug in???

  11. afsar
    Member
    Posted 6 years ago #

    Hi,
    I am new to the WP. Is it possible to rename the user's role name 'editor' to 'Reporter' in the admin panel ?

    Thanks in Advance

  12. kevinB
    Member
    Posted 6 years ago #

    The Role Manager plugin can rename roles.

  13. rexreed
    Member
    Posted 6 years ago #

    The Role Scoper plugin kills the Page Template selection menu in Advanced Options for Write or Manage Page. The pull-down simply disappears when this plugin is activated :(

    Important bug to fix for folks who need their page templates!

  14. kevinB
    Member
    Posted 6 years ago #

    The Page Template selection bug is fixed in the current Role Scoper beta revision.

    Thanks, Rex, for the report.

  15. Raptor2000
    Member
    Posted 6 years ago #

    I posted this question on the plugin page, but maybe I should have posted it here instead. Feel free to delete that comment if it should have been here.

    What I am trying to do is restrict a group (or a user) to editing certain pages, but I also want to allow them to publish new pages, with the restriction that the parent page has to be one of the pages that they own. The writeup on the plugin implies that this is one of the problems that the plugin is supposed to solve. You say "Can you enable someone to create a new page, but specify a subset of “parent” pages it can be linked to?" But I can't figure out how to do this.

    Thanks for writing a very useful plugin!

  16. kevinB
    Member
    Posted 6 years ago #

    Questions and concerns posted to the Agapetry Support Forum will generally get the quickest response.

    Thanks to Ken's comment on the plugin page, I corrected several related bugs which hindered Page Parent filtering. Full description here.

  17. Raptor2000
    Member
    Posted 6 years ago #

    The full description of version 0.9.13, linked above, was there for a little while, but now it is gone.

  18. jayant
    Member
    Posted 6 years ago #

    I wish to allow registered users to contribute some articles on my blog. The problem is if a contributor user logs in, he presently sees the title of all the drafts, future posts from all the users.

    I will want the contributing user to know the count of only his drafts or future posts and not of any other user. I will not want him to even see the title of such posts.

    Can this be achieved by this plugin?

  19. tinem
    Member
    Posted 6 years ago #

    I want some people to only have ONE page of their own where they can update their content. And the headline should be MEMBERS.

    For instance - one member is called Kirsten Iversen (Title then Kirsten Iversen and when people click on this link their page will open with the info). She and the admin should have the rights to make changes and update.

    And then another member called Werner Andersen and this as a tittle and like Kirsten iversen and so.

    Would it be easy to do this? And if yes please tell me how?

    Do I as an admin make the pages ready when a new member subscribe to the blog and then give the person rights for only this page?

  20. kevinB
    Member
    Posted 5 years ago #

    @jayant,

    Yes, Role Scoper's Admin filtering is designed to work just as you describe. Posts which the user cannot edit will not appear in the Edit Posts / Edit Pages list. The published / future / draft counts also pertain only to what the user can edit (although since WP does not actually provide hooks to do that, the filtering code is messy and will need testing with each WP release to ensure that functionality is not broken).

  21. kevinB
    Member
    Posted 5 years ago #

    @tinem,

    1. Create a Page named Kirsten Iverson
    2. While editing the page, scroll down to the "Contributors" tab (under "Advanced Options")
    3. In "Contributors" tab, select the "exclusive" checkbox
    4. In "Editors" tab, select the "exclusive" checkbox
    5. In "Editors" tab, select Kirsten
    6. Save the Page

    Now only Kirsten and Administrators can edit the page.

    Note that Role Scoper will not create these pages automatically for you. I'm not sure what you mean by "the headline should be MEMBERS". If you want, it's fine to make a Members page with "Kirsten Iverson" etc. as a subpage. That won't affect these instructions.

  22. spartyon
    Member
    Posted 5 years ago #

    thanks kevinB, looks good will have to try it out.

  23. panoptic
    Member
    Posted 5 years ago #

    Would Role Scoper solve this problem?

    We have a firm blog that requires "peer" review from management and from legal prior to publication. Could Role Scoper be used to define a new role for "reviewer" which would allow them to preview a post prior to publication without giving them the ability to edit or to publish the post?

  24. kevinB
    Member
    Posted 5 years ago #

    Actually, you could do it without Role Scoper if you don't already use private posts for some other purpose. The post could be published with "keep private" checked.

    Install Role Manager to perform the one-time operation of defining a new Role "Private Reviewer", with the capabilities "read" and "read_private_posts".

    Then assign your user(s) the "Private Reviewer" role.

    After the review is completed, and editor / administrator would need to remove the "keep private" setting.

    If you need to control visibility per-post or per-category, Role Scoper could be used (and would make the Role Manager operation unnecessary).

  25. kevinB
    Member
    Posted 5 years ago #

    If anyone has had trouble getting Role Scoper to force the listing of private pages to users who have a sufficient role assignment, try this manual code patch.

    That function was working with the hidden content teaser enabled, but not otherwise. Will include this in the next plugin revision.

  26. rcain
    Member
    Posted 5 years ago #

    great plugin - thanks. however, its so useful, that i am attempting to us it on an WordPress MU 2.6 installation also. seems generally to work ok so far as i've tested, however the following warning message is produced:

    "
    Warning: Illegal offset type in ...../htdocs/wp-content/plugins/role-scoper/admin/filters-admin_rs.php on line 1259
    "

    when i select admin, links, edit link.

    any idea what might be causing this (it looks a bit worrying)?

    thanks in advance

  27. hannah.coffey
    Member
    Posted 5 years ago #

    Hi Kevin,

    I have downloaded Role Scoper and followed all of your instructions. However, when I log in as anything but the administrator and click 'manage' and then 'posts' it says no posts found.

    Any idea what I'm doing wrong?

    Thanks.

  28. arisejesus
    Member
    Posted 5 years ago #

    i do not know if this is related.
    i am using Role Scoper, but now anonymous user cannot view my private page. how do i enable it so that anyone also can view those private pages?
    thanks in advance

  29. rad_thundercat
    Member
    Posted 5 years ago #

    Hi all, I'm having some trouble with role-scoper 1.0.1 and 1.0.0 (however, 0.9.27 works fine).

    As soon as I activate the plugin, I get a white page with this error:

    WordPress database error BLOB/TEXT column 'group_name' can't have a default value for query ALTER TABLE wpcdgitest_groups_rs MODIFY COLUMN group_name text NOT NULL default '' made by activate_plugin, do_action, call_user_func_array, scoper_activate, scoper_db_setup, scoper_update_schema
    WordPress database error BLOB/TEXT column 'group_description' can't have a default value for query ALTER TABLE wpcdgitest_groups_rs MODIFY COLUMN group_description text NOT NULL default '' made by activate_plugin, do_action, call_user_func_array, scoper_activate, scoper_db_setup, scoper_update_schema

    Sorry for the lack of formatting, but that is how it kicks out in firefox.

    Here are my server settings:

    * Operating System : WINNT
    * Server : Microsoft-IIS/6.0
    * Memory usage : 14.26 MByte
    * MYSQL Version : 5.0.27-community-nt
    * SQL Mode : STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    * PHP Version : 5.1.6
    * PHP Safe Mode : Off
    * PHP Allow URL fopen : On
    * PHP Memory Limit : 128M
    * PHP Max Upload Size : 10M
    * PHP Max Post Size : 8M
    * PHP Max Script Execute Time : 3600s
    * PHP Exif support : Yes ( V1.4 )
    * PHP IPTC support : Yes
    * PHP XML support : Yes

    I'm using WordPress 2.7.1

    What changed from role-scoper 0.9.27 to 1.0.0 that would make it throw like this?

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic