Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




custom role users can edit custom post type but don't allow creating new

UserPost

3:59 am
October 28, 2011


katutxakur

Member

posts 3

1

I have a custom post type called strip wich I made with the plugin GD Custom Posts And Taxonomies Tools. It has Capability Type: strip.

I also have a custom role made with plugin User Role Editor.

Users with that custom role should be able to edit published or scheduled Strips but shouldn't be allowed to create new ones.

How should I configure Role Scoper?

4:48 pm
November 1, 2011


katutxakur

Member

posts 3

2

More info:


Custom Post Type (Plugin: GD Custom Posts And Taxonomies Tools):

  • name: strip
  • Capabilities: Use capability type
  • Capability Type: strip

Then I created these capabilities and I also created a role called English with User Role Editor plugin:

  • edit_others_strips
  • read_private_strips
  • delete_strips
  • delete_published_strips
  • edit_private_strips
  • edit_strips
  • publish_strips
  • delete_private_strips
  • delete_others_strips
  • edit_published_strips

Role English has the following capabilities:

  • edit_others_strips
  • edit_private_strips
  • edit_published_strips
  • level_0
  • publish_strips
  • read
  • read_private_strips

Role Scoper configuration:

  • General: [WP English] is Strip Contributor
  • Strips: [WP English] is Strip Contributor
  • Options->RS Role Definitions: Strip Contributor has the following selected
    • edit_others_strips
    • read_private_strips
    • edit_private_strips
    • publish_strips
    • edit_strips (can't deselect, this may be the problem?)
    • edit_published_strips
    • read

The problem is that users with the role English can edit and create new strips. I don't want them to create new strips.

Thanks in advance.

1:41 pm
November 3, 2011


Kevin

Admin

posts 2503

3

It sounds like you want the "edit_posts" capability to mean "create_new_posts". It would be nice if WordPress defined such a capability, but it doesn't. "edit_posts" basically means "edit_any_posts_at_all".

Role Scoper can't change the native meaning of "edit_posts"; that's why the checkbox is grayed out. What you could do is remove the General Role (i.e. sitewide) role assignments and just assign the role for specific strips. Then any associated capabilities would be granted only for that strip and not for creation of new strips.

4:49 pm
November 3, 2011


katutxakur

Member

posts 3

4

So the only way for just allowing editing strips is to give editing rights to each group every time I create a new strip?

Anyway, I tried changing the following (kept the rest like in my previous message):

Role Scoper configuration:

  • General: nothing
  • Strips: [WP English] is Strip Contributor
  • Options->RS Role Definitions: Strip Contributor has the following selected
    • edit_others_strips
    • read_private_strips
    • edit_private_strips
    • publish_strips
    • edit_strips (can't deselect, this may be the problem?)
    • edit_published_strips
    • read

But if I login as a [WP English] user, I can't see any strip. What I'm doing wrong?

7:10 am
November 4, 2011


Kevin

Admin

posts 2503

5

katutxakur said:

So the only way for just allowing editing strips is to give editing rights to each group every time I create a new strip?

No, you also have the ability to assign the role as a "Default for new Pages".

In fact, I'm wondering if that's what you have actually done already. "Defaults for new Pages" does not apply the role to any existing pages. If not, can you clarify what you mean by "Strips: [WP English] is Strip Contributor"?

I'm also wondering why you changed the Strip Contributor role def to become essentially identical to Strip Editor. Why not just assign a Strip Editor role?


About the Agapetry forum

Currently Online:

14 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1246

Posts: 5654

Members:

There are 1257 members

There are 1 guests


Kevin has made 2503 posts

Top Posters:

metal450 - 178

Ragnar - 108

YikYak - 70

whiteorb - 49

Daisy - 35

Administrator: Kevin | Moderators: Kevin