Ticket #2301 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Edit Pages - Limit to Owner?

Reported by: gregkaufmanwp Assigned to: davidhouse
Priority: high Milestone: 2.1
Component: Administration Version: 2.0
Severity: normal Keywords: edit pages owner roles capabilities bg|has-patch
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

restrict_pages.php (1.0 kB) - added by ringmaster on 01/17/06 21:19:50.
A plugin better handled in core, not exactly sure how well it works.
2301.diff (4.0 kB) - added by davidhouse on 01/17/06 22:31:35.

Change History

01/16/06 22:01:16 changed by davidhouse

  • owner changed from anonymous to davidhouse.
  • status changed from new to assigned.

Looks good.

01/17/06 07:55:07 changed by skeltoac

  • status changed from assigned to closed.
  • resolution set to duplicate.

See #2257

01/17/06 21:11:53 changed by ringmaster

  • status changed from closed to reopened.
  • resolution deleted.
  • severity changed from major to enhancement.
  • milestone changed from 2.0.1 to 2.1.

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.

01/17/06 21:14:40 changed by davidhouse

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

01/17/06 21:19:50 changed by ringmaster

  • attachment restrict_pages.php added.

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

01/17/06 21:35:21 changed by gregkaufmanwp

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.

01/17/06 22:30:21 changed by davidhouse

  • keywords changed from edit pages owner roles capabilities to edit pages owner roles capabilities bg|has-patch.

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.

01/17/06 22:31:35 changed by davidhouse

  • attachment 2301.diff added.

02/11/06 09:56:08 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

(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