Commit Graph

124 Commits

Author SHA1 Message Date
Ron Rennick 8b4fbdb503 merge in multisite login, wp-includes, See #11644
git-svn-id: https://develop.svn.wordpress.org/trunk@12697 602fd350-edb4-49c9-b593-d223f7449a82
2010-01-11 21:49:40 +00:00
Ryan Boren d93a81bd35 Assume current user of user ID is not passed. Props filosofo. fixes #11808
git-svn-id: https://develop.svn.wordpress.org/trunk@12650 602fd350-edb4-49c9-b593-d223f7449a82
2010-01-07 19:45:57 +00:00
Ryan Boren 435053b040 Remove certain caps for non super admins when running multisite. see #11644
git-svn-id: https://develop.svn.wordpress.org/trunk@12630 602fd350-edb4-49c9-b593-d223f7449a82
2010-01-07 04:05:53 +00:00
Ryan Boren 03f8d8996d Return true for all admin user is multisite is not enabled. see #11644
git-svn-id: https://develop.svn.wordpress.org/trunk@12612 602fd350-edb4-49c9-b593-d223f7449a82
2010-01-06 23:39:40 +00:00
Ryan Boren 8a5d801117 Introduce is_super_admin(). see #11644.
git-svn-id: https://develop.svn.wordpress.org/trunk@12611 602fd350-edb4-49c9-b593-d223f7449a82
2010-01-06 23:27:22 +00:00
Ryan Boren 9ef2cb198f More custom post type support. Props scribu. see #9674
git-svn-id: https://develop.svn.wordpress.org/trunk@12597 602fd350-edb4-49c9-b593-d223f7449a82
2010-01-04 16:58:43 +00:00
Peter Westwood 12cc58c227 Mark user levels as Deprecated. Fixes #10805 props nacin.
git-svn-id: https://develop.svn.wordpress.org/trunk@12585 602fd350-edb4-49c9-b593-d223f7449a82
2009-12-30 16:51:32 +00:00
Peter Westwood 4e0adefa76 Ensure we don't destory the $wp_roles->role_objects property when assigning a second role to a WP_User object. Fixes #9128 props dd32.
git-svn-id: https://develop.svn.wordpress.org/trunk@12479 602fd350-edb4-49c9-b593-d223f7449a82
2009-12-22 11:42:46 +00:00
Peter Westwood 4701dd33f6 Check the correct global in get_page and also ensure that the cap check for deleting pages copes for the default page we edit when adding new. Fixes #11203.
git-svn-id: https://develop.svn.wordpress.org/trunk@12332 602fd350-edb4-49c9-b593-d223f7449a82
2009-12-07 18:01:02 +00:00
Peter Westwood ebe702a851 Better documentation on the format of the capabilities when adding a role. Fixes #11106 props simonwheatley.
git-svn-id: https://develop.svn.wordpress.org/trunk@12160 602fd350-edb4-49c9-b593-d223f7449a82
2009-11-09 22:15:50 +00:00
Peter Westwood 94a2054bf5 Ensure we always have author info to check capabilities with. Fixes notice on Add new post page.
git-svn-id: https://develop.svn.wordpress.org/trunk@12053 602fd350-edb4-49c9-b593-d223f7449a82
2009-10-18 12:06:39 +00:00
Mark Jaquith 529e336c1e Add set_user_role action hook. props jamescollins, usermrpapa. fixes #10716
git-svn-id: https://develop.svn.wordpress.org/trunk@12028 602fd350-edb4-49c9-b593-d223f7449a82
2009-10-14 02:30:51 +00:00
Ryan Boren 05458bb414 Use oEmbed for youtube. Props Viper007Bond. see #10337
git-svn-id: https://develop.svn.wordpress.org/trunk@12027 602fd350-edb4-49c9-b593-d223f7449a82
2009-10-13 22:36:24 +00:00
Ryan Boren e71f15a979 Embeds. Props Viper007Bond. see #10337
git-svn-id: https://develop.svn.wordpress.org/trunk@12023 602fd350-edb4-49c9-b593-d223f7449a82
2009-10-13 17:04:22 +00:00
Ryan Boren b7f82a38b5 Filter fields through kses upon display. Introduce sanitize_user_object() and sanitize_user_field(). see #10751
git-svn-id: https://develop.svn.wordpress.org/trunk@11929 602fd350-edb4-49c9-b593-d223f7449a82
2009-09-14 13:57:48 +00:00
Ryan Boren d098dfcd59 Add missing break. Props snakefoot. fixes #10692
git-svn-id: https://develop.svn.wordpress.org/trunk@11912 602fd350-edb4-49c9-b593-d223f7449a82
2009-09-11 13:42:15 +00:00
Ryan Boren d9c6047a27 Disallow unfiltered uploads for admins by default. fixes #10692
git-svn-id: https://develop.svn.wordpress.org/trunk@11887 602fd350-edb4-49c9-b593-d223f7449a82
2009-08-28 00:17:53 +00:00
Peter Westwood 80e4f72f72 Move the storage of the metadata for trashed posts into the post meta table rather than storing it in an option. See #4529.
git-svn-id: https://develop.svn.wordpress.org/trunk@11878 602fd350-edb4-49c9-b593-d223f7449a82
2009-08-25 22:05:15 +00:00
Andrew Ozz ca608e336a Don't let contributors to re-publish their trashed posts, props caesarsgrunt, see #4529
git-svn-id: https://develop.svn.wordpress.org/trunk@11873 602fd350-edb4-49c9-b593-d223f7449a82
2009-08-24 20:48:31 +00:00
Andrew Ozz 782977afbf "Trash" updates, props caesarsgrunt, see #4529
git-svn-id: https://develop.svn.wordpress.org/trunk@11841 602fd350-edb4-49c9-b593-d223f7449a82
2009-08-19 08:35:24 +00:00
Ryan Boren 66ab91564b Cast to array to fix warning. Props johnkolbert, Denis-de-Bernardy. fixes #9128
git-svn-id: https://develop.svn.wordpress.org/trunk@11019 602fd350-edb4-49c9-b593-d223f7449a82
2009-04-20 20:03:20 +00:00
Peter Westwood 16ab2e1302 Let a plugin filter the expanded capabilities returned by map_meta_cap. Fixes #9462 props rmccue.
git-svn-id: https://develop.svn.wordpress.org/trunk@10874 602fd350-edb4-49c9-b593-d223f7449a82
2009-04-05 17:23:04 +00:00
Ryan Boren cc77e573b6 Explicitly return ref for the sake of PHP4. Fixes user_level being empty when installing on PHP4. Props Mr Pete. fixes #8317 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@10200 602fd350-edb4-49c9-b593-d223f7449a82
2008-12-12 20:47:18 +00:00
Ryan Boren baaaa352ba Strip trailing whitespace
git-svn-id: https://develop.svn.wordpress.org/trunk@10150 602fd350-edb4-49c9-b593-d223f7449a82
2008-12-09 18:03:31 +00:00
Ryan Boren 1ca42d81e3 phpdoc for capabilities.php. Props jacobsantos. fixes #5632
git-svn-id: https://develop.svn.wordpress.org/trunk@8904 602fd350-edb4-49c9-b593-d223f7449a82
2008-09-16 21:51:36 +00:00
Ryan Boren 197fc1d118 Notice fixes. Props DD32. see #7509
git-svn-id: https://develop.svn.wordpress.org/trunk@8646 602fd350-edb4-49c9-b593-d223f7449a82
2008-08-14 17:00:37 +00:00
Mark Jaquith fc79b3fc69 Whitespacing/coding standards cleanup for capabilities.php
git-svn-id: https://develop.svn.wordpress.org/trunk@8573 602fd350-edb4-49c9-b593-d223f7449a82
2008-08-06 20:50:30 +00:00
Mark Jaquith 3cab99fbd2 Cast to array when using foreach(). Props santosj (and thanks for your perseverance!). fixes #2784
git-svn-id: https://develop.svn.wordpress.org/trunk@8572 602fd350-edb4-49c9-b593-d223f7449a82
2008-08-06 20:31:54 +00:00
Ryan Boren 357304b1ce Default cap arg should be an empty array. Props tellyworth. fixes #5520
git-svn-id: https://develop.svn.wordpress.org/trunk@7701 602fd350-edb4-49c9-b593-d223f7449a82
2008-04-16 21:56:03 +00:00
Ryan Boren d8b614bfc7 Merge user-edit.php and profile.php. Props nbachiyski. fixes #5736
git-svn-id: https://develop.svn.wordpress.org/trunk@6697 602fd350-edb4-49c9-b593-d223f7449a82
2008-01-31 21:44:17 +00:00
Ryan Boren 3a8b2fcca3 Remove unused vars. Props DD32. see #5418
git-svn-id: https://develop.svn.wordpress.org/trunk@6364 602fd350-edb4-49c9-b593-d223f7449a82
2007-12-06 19:49:33 +00:00
Ryan Boren 1b36113b6a Space before slash to properly close br tag. Props tmountjr. fixes #4717
git-svn-id: https://develop.svn.wordpress.org/trunk@5870 602fd350-edb4-49c9-b593-d223f7449a82
2007-08-14 03:12:24 +00:00
Ryan Boren c9b37847ce Better draft, private, and future post/page management from mdawaffe. fixes #3945
git-svn-id: https://develop.svn.wordpress.org/trunk@5575 602fd350-edb4-49c9-b593-d223f7449a82
2007-05-28 18:34:06 +00:00
Ryan Boren 375aab4c00 Fix typo in read_pages conditional. Props McShelby. fixes #3705
git-svn-id: https://develop.svn.wordpress.org/trunk@4825 602fd350-edb4-49c9-b593-d223f7449a82
2007-01-28 21:58:01 +00:00
Ryan Boren 770da54d44 ID instead of id. Props Nazgul. fixes #3152
git-svn-id: https://develop.svn.wordpress.org/trunk@4505 602fd350-edb4-49c9-b593-d223f7449a82
2006-11-20 05:01:57 +00:00
Ryan Boren c1767df117 ID instead of id. Props Nazgul. fixes #3152
git-svn-id: https://develop.svn.wordpress.org/trunk@4504 602fd350-edb4-49c9-b593-d223f7449a82
2006-11-20 04:29:06 +00:00
Ryan Boren e44ea1ff93 Remove trailing spaces and convert spaces to tabs. Props Nazgul. fixes #986
git-svn-id: https://develop.svn.wordpress.org/trunk@4495 602fd350-edb4-49c9-b593-d223f7449a82
2006-11-19 07:56:05 +00:00
Ryan Boren a8dd93d285 Page cap fixes from activeingredient. fixes #3096
git-svn-id: https://develop.svn.wordpress.org/trunk@4158 602fd350-edb4-49c9-b593-d223f7449a82
2006-09-02 17:15:18 +00:00
Ryan Boren 88cd96ff72 Allow use of global roles array instead of options db. Useful for multi-blog setups.
git-svn-id: https://develop.svn.wordpress.org/trunk@4113 602fd350-edb4-49c9-b593-d223f7449a82
2006-08-24 23:23:36 +00:00
Ryan Boren 1053ca7014 Better handling of users with no role. Props Mark Jaquith. #2809
git-svn-id: https://develop.svn.wordpress.org/trunk@3859 602fd350-edb4-49c9-b593-d223f7449a82
2006-06-10 20:26:26 +00:00
Ryan Boren f7e56ee9b3 Add more fine grained user management caps. Part 1. #2775
git-svn-id: https://develop.svn.wordpress.org/trunk@3846 602fd350-edb4-49c9-b593-d223f7449a82
2006-06-05 16:52:21 +00:00
Ryan Boren 8f12196bd1 Remove private posts from front page query. Aadd private posts and page caps. fixes #2613
git-svn-id: https://develop.svn.wordpress.org/trunk@3772 602fd350-edb4-49c9-b593-d223f7449a82
2006-05-11 23:13:35 +00:00
Ryan Boren 8cdd21978f Add wp_revoke_user() and WP_User::remove_all_caps() to help those doing multi blog stuff.
git-svn-id: https://develop.svn.wordpress.org/trunk@3705 602fd350-edb4-49c9-b593-d223f7449a82
2006-04-13 04:49:38 +00:00
Ryan Boren 3f23e768fe Move DB prefix dependent code to separate init routines that can be called independently when the prefix changes. These methods are for internal use only.
git-svn-id: https://develop.svn.wordpress.org/trunk@3668 602fd350-edb4-49c9-b593-d223f7449a82
2006-03-30 23:35:42 +00:00
Ryan Boren 5e18dd3e86 prefix not table_prefix. Props Kafkaesqui. fixes #2528
git-svn-id: https://develop.svn.wordpress.org/trunk@3604 602fd350-edb4-49c9-b593-d223f7449a82
2006-03-03 20:36:40 +00:00
Ryan Boren 4489be47f5 Use table prefix from wpdb. Props Mark J. #2524
git-svn-id: https://develop.svn.wordpress.org/trunk@3603 602fd350-edb4-49c9-b593-d223f7449a82
2006-03-03 17:19:05 +00:00
Ryan Boren 64173c9918 Move deprecated functions to deprecated.php. #2520
git-svn-id: https://develop.svn.wordpress.org/trunk@3589 602fd350-edb4-49c9-b593-d223f7449a82
2006-03-02 03:27:48 +00:00
Ryan Boren cd4a8a24c5 current user cleanup
git-svn-id: https://develop.svn.wordpress.org/trunk@3566 602fd350-edb4-49c9-b593-d223f7449a82
2006-02-22 19:08:55 +00:00
Ryan Boren 143d456a7f If requesting post caps for a page, redirect to equivalent page caps.
git-svn-id: https://develop.svn.wordpress.org/trunk@3526 602fd350-edb4-49c9-b593-d223f7449a82
2006-02-14 01:10:51 +00:00
Ryan Boren 6008a133c4 Death to trailing tabs. Props Mark J. fixes #2405
git-svn-id: https://develop.svn.wordpress.org/trunk@3517 602fd350-edb4-49c9-b593-d223f7449a82
2006-02-12 07:53:23 +00:00
Ryan Boren bde96bc025 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
git-svn-id: https://develop.svn.wordpress.org/trunk@3513 602fd350-edb4-49c9-b593-d223f7449a82
2006-02-11 09:56:02 +00:00
Ryan Boren 9ffb23ab68 add_role() fix from nielshackius. fixes #2298
git-svn-id: https://develop.svn.wordpress.org/trunk@3482 602fd350-edb4-49c9-b593-d223f7449a82
2006-01-25 03:39:59 +00:00
Ryan Boren e165c3394e wp_roles cleanup.
git-svn-id: https://develop.svn.wordpress.org/trunk@3452 602fd350-edb4-49c9-b593-d223f7449a82
2006-01-18 01:06:11 +00:00
Ryan Boren 44fc04c42e Don't treat a numeric user name as an id.
git-svn-id: https://develop.svn.wordpress.org/trunk@3310 602fd350-edb4-49c9-b593-d223f7449a82
2005-12-15 16:45:20 +00:00
Ryan Boren 5a02ae79af If no user is logged in, setup an empty user.
git-svn-id: https://develop.svn.wordpress.org/trunk@3299 602fd350-edb4-49c9-b593-d223f7449a82
2005-12-13 03:46:40 +00:00
Ryan Boren 73edfc7c20 Add read_post meta cap.
git-svn-id: https://develop.svn.wordpress.org/trunk@3297 602fd350-edb4-49c9-b593-d223f7449a82
2005-12-13 00:54:52 +00:00
Ryan Boren 53271cf5ac role_has_cap and user_has_cap filters from ringmaster. fixes #2005
git-svn-id: https://develop.svn.wordpress.org/trunk@3296 602fd350-edb4-49c9-b593-d223f7449a82
2005-12-12 23:20:44 +00:00
Ryan Boren 3edb82141a Add edit_pages checks.
git-svn-id: https://develop.svn.wordpress.org/trunk@3269 602fd350-edb4-49c9-b593-d223f7449a82
2005-12-05 04:04:23 +00:00
Ryan Boren ba38c0c3c4 Remove ugly whitespace. Props abhay. fixes #1996
git-svn-id: https://develop.svn.wordpress.org/trunk@3250 602fd350-edb4-49c9-b593-d223f7449a82
2005-11-30 21:13:18 +00:00
Ryan Boren 4a4598bbdb add_role() and remove_role() convenience wrappers around
git-svn-id: https://develop.svn.wordpress.org/trunk@3249 602fd350-edb4-49c9-b593-d223f7449a82
2005-11-30 20:04:04 +00:00
Ryan Boren 1dae83d024 Return role object after adding.
git-svn-id: https://develop.svn.wordpress.org/trunk@3242 602fd350-edb4-49c9-b593-d223f7449a82
2005-11-30 07:32:43 +00:00
Ryan Boren 7cec380314 Add get_role() convenience wrapper.
git-svn-id: https://develop.svn.wordpress.org/trunk@3238 602fd350-edb4-49c9-b593-d223f7449a82
2005-11-29 18:47:28 +00:00
Ryan Boren 62f1fd972b Pull the values in WP_User::data directly into WP_User so that we don't have to do ->data->blah.
git-svn-id: https://develop.svn.wordpress.org/trunk@3102 602fd350-edb4-49c9-b593-d223f7449a82
2005-11-16 02:54:23 +00:00
Ryan Boren 24738f1176 Pass along grant state when saving cap. Props Owen. fixes #1702
git-svn-id: https://develop.svn.wordpress.org/trunk@2904 602fd350-edb4-49c9-b593-d223f7449a82
2005-09-22 20:39:37 +00:00
Ryan Boren 1f44c5d3b1 Spiffier role creation code.
git-svn-id: https://develop.svn.wordpress.org/trunk@2898 602fd350-edb4-49c9-b593-d223f7449a82
2005-09-20 23:48:28 +00:00
Ryan Boren 3e618e13be remove_cap() fix from mdawaffe. fixes #1608
git-svn-id: https://develop.svn.wordpress.org/trunk@2851 602fd350-edb4-49c9-b593-d223f7449a82
2005-09-08 20:39:37 +00:00
Ryan Boren 720b7c5d36 Capabilities fixes from the O man. fixes #1561
git-svn-id: https://develop.svn.wordpress.org/trunk@2793 602fd350-edb4-49c9-b593-d223f7449a82
2005-08-20 01:37:41 +00:00
Matt Mullenweg 5880f1a3ad Setting native eol:style
git-svn-id: https://develop.svn.wordpress.org/trunk@2735 602fd350-edb4-49c9-b593-d223f7449a82
2005-07-23 16:16:03 +00:00
Matt Mullenweg c3694be892 Typo was making everyone admins.
git-svn-id: https://develop.svn.wordpress.org/trunk@2734 602fd350-edb4-49c9-b593-d223f7449a82
2005-07-23 16:14:29 +00:00
Ryan Boren 9527e184fe More cap migration.
git-svn-id: https://develop.svn.wordpress.org/trunk@2714 602fd350-edb4-49c9-b593-d223f7449a82
2005-07-15 02:16:45 +00:00
Ryan Boren 235345a916 Move user_can_*() functions to capabilities.php.
git-svn-id: https://develop.svn.wordpress.org/trunk@2713 602fd350-edb4-49c9-b593-d223f7449a82
2005-07-15 01:27:01 +00:00
Ryan Boren 7e94ba45c5 Cap migration.
git-svn-id: https://develop.svn.wordpress.org/trunk@2712 602fd350-edb4-49c9-b593-d223f7449a82
2005-07-15 01:24:08 +00:00
Ryan Boren 6059fcf644 Fix typos in is_role() and get_userdata(). fixes #1509 Props: mdawaffe
git-svn-id: https://develop.svn.wordpress.org/trunk@2711 602fd350-edb4-49c9-b593-d223f7449a82
2005-07-14 22:58:58 +00:00
Ryan Boren 19ab84315c Role/capability system. Round one. Props: Owen Winkler
git-svn-id: https://develop.svn.wordpress.org/trunk@2703 602fd350-edb4-49c9-b593-d223f7449a82
2005-07-11 22:39:50 +00:00