Make WordPress Core

Opened 19 years ago

Closed 19 years ago

#2301 closed enhancement (fixed)

Edit Pages - Limit to Owner?

Reported by: gregkaufmanwp's profile gregkaufmanwp Owned by: davidhouse's profile davidhouse
Milestone: 2.1 Priority: high
Severity: normal Version: 2.0
Component: Administration Keywords: edit pages owner roles capabilities bg|has-patch
Focuses: Cc:

Description

It was easy to limit page editing only to the page owner in 1.5. I have the Role Manager plugin installed in WP 2.0, and I'm trying to figure out how to enable the edit_pages role in 2.0 for a user, but not allow that user the ability edit ALL pages. This functionality exists for edit posts (edit_others_posts), but what about pages?

I understand this isn't an issue with the plugin, rather this is a major shortcoming of WP 2.0, in terms of being able to use WordPress as a CMS. It doesn't seem like it would be a big deal to have create a capability "edit_others_pages" similar to edit_others_posts. This would allow user access control as needed when using WordPress 2.0 as a CMS.

Attachments (2)

restrict_pages.php (1.0 KB) - added by ringmaster 19 years ago.
A plugin better handled in core, not exactly sure how well it works.
2301.diff (4.0 KB) - added by davidhouse 19 years ago.

Download all attachments as: .zip

Change History (9)

#1 @davidhouse
19 years ago

  • Owner changed from anonymous to davidhouse
  • Status changed from new to assigned

Looks good.

#2 @skeltoac
19 years ago

  • Resolution set to duplicate
  • Status changed from assigned to closed

See #2257

#3 @ringmaster
19 years ago

  • Milestone changed from 2.0.1 to 2.1
  • Resolution duplicate deleted
  • Severity changed from major to enhancement
  • Status changed from closed to reopened

This isn't a duplicate.

This is a feature enhancement. Whether by design or omission, WordPress has no capability to prevent a user form editing another user's Page. This is unlike Posts, for which there exists an edit_others_posts capability.

WordPress should include a capability, "edit_others_pages", which would allow a user to edit Pages that were authored by other users. Users that do not have this capability should be restricted from editing Pages that they have not authored.

This functionality would be similar to the existing functionality of edit_others_posts, and would improve WordPress' use as a CMS.

#4 @davidhouse
19 years ago

Actually, the current edit_others_posts currently covers posts and pages, but I'm writing a patch to change that.

@ringmaster
19 years ago

A plugin better handled in core, not exactly sure how well it works.

#5 @gregkaufmanwp
19 years ago

Really exciting to see you guys so actively taking charge of this request. My first time using the Trac system, and needless to say I'm thoroughly impressed with the WordPress development community. A huge thanks!

Just a quick note -- I have a user set to Role Author (so edit_others_posts is disabled), and using the Role Manager plugin I added the additional capability of edit_pages for that user. Eventhough edit_others_posts is disabled, the user is able to edit the pages of other Owners. Furthermore, when this user makes changes to a page with another Owner and saves that page, the Owner is modified from the original Owner to the user who just hit save.

#6 @davidhouse
19 years ago

  • Keywords bg|has-patch added

Core patch. I haven't tested it much because I had trouble getting WordPress to pick up my new caps (added it in populate_roles_160() in upgrade-schema.php but upgrading seemed to do nothing...). Just reading the last comment, I'm not positive I fixed the issue raised (might have done it inadvertantly :)), I'll see if I can test more tomorrow.

@davidhouse
19 years ago

#7 @ryan
19 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [3513]) Add new page caps now that pages can be draft or publish. Brings page caps to parity with posts. Add delete caps for posts and pages. fixes #2382 #2336 #2301

Note: See TracTickets for help on using tickets.