[4309]
|
johnjamesjacoby
|
Capabilities:
* Add label to admin user role UI, to match !WordPress core convention.
* See #1939.
|
[4406]
|
johnjamesjacoby
|
Capabilities:
* Add sanity check in bbp_set_current_user_default_role() to check that setup_current_user action has already fired.
* If not, bail early, since there is no user to attach a role to yet.
* This should not happen under normal circumstances, only when doing advanced tricks or otherwise _doing_it_wrong().
* This bit is subject to change, based on testing.
|
[4299]
|
johnjamesjacoby
|
Capabilities:
* Add setting callback for default_role.
* Update verbiage for auto-role/global-access.
* See #1939.
|
[4290]
|
johnjamesjacoby
|
Capabilities:
* Add support for forum specific roles in core/capabilities.php.
* See #1939.
|
[4341]
|
johnjamesjacoby
|
Capabilities:
* Add tool for remapping site users to the expected forums role.
* Does not remove existing !WordPress core roles.
* See #1939, #2010.
|
[4678]
|
johnjamesjacoby
|
Capabilities:
* Allow keymaster role to use Forums tools and save Forums settings.
* Fixes #2139.
|
[4453]
|
johnjamesjacoby
|
Capabilities:
* Allow moderators to view hidden forums too.
|
[4454]
|
johnjamesjacoby
|
Capabilities:
* Allow moderators to view hidden forums too.
* For trunk.
|
[4307]
|
johnjamesjacoby
|
Capabilities:
* Always show roles UI; only show capabilities if switch is on.
* See #1939.
|
[4182]
|
johnjamesjacoby
|
Capabilities:
* Bail if in network admin.
* Prevent modifying blog caps in network admin area.
|
[4184]
|
johnjamesjacoby
|
Capabilities:
* Bring back bbp_add_caps() and bbp_remove_caps().
* Remove role mask, and more aggressively add registered user to site with default role when user visits the site for the first time.
* See #1942.
|
[4300]
|
johnjamesjacoby
|
Capabilities:
* Do no call bbp_add_caps() on activation anymore.
* This is handled by new forums roles.
* See #1939.
|
[4316]
|
johnjamesjacoby
|
Capabilities:
* Enforce blocked logged in users by showing them a 404 if they cannot spectate.
* See #1939.
|
[4192]
|
johnjamesjacoby
|
Capabilities:
* Enforce negative capabilities in user_profile_update() by using add_cap( $cap, false );
* Remove new-role dance from capability reset, as bbPress capabilities are still added to each individual role as needed.
|
[4304]
|
johnjamesjacoby
|
Capabilities:
* Filter out bbPress roles from editable_roles array.
* Introduce bbp_filter_blog_editable_roles() and hook to 'editable_roles'.
* See #1939.
|
[4351]
|
johnjamesjacoby
|
Capabilities:
* Get correct capabilities for anonymous role in bbp_get_editable_roles().
* These are currently the same, though will change in future versions.
|
[4350]
|
johnjamesjacoby
|
Capabilities:
* Hook bbp_add_forums_roles() to 'bbp_setup_theme' since it's before user init.
* Add anonymous role to dynamic role loader.
* Fixes issues with roles not being mapped correctly on new installations.
|
[4371]
|
johnjamesjacoby
|
Capabilities:
* Hook bbp_set_current_user_default_role() to 'switch_blog'
* Fixes bug where mapped forums role was lost on multisite when WP_Admin_Bar::initialize() would switch to a blog that a user is a member of, if the user was viewing a forum on a site they do not have a role on.
* See #1939.
|
[4303]
|
johnjamesjacoby
|
Capabilities:
* Introduce 'bbp_profile_update' sub-action.
* Use in place of piggy-backed admin user profile actions.
* See #1939.
|
[4288]
|
johnjamesjacoby
|
Capabilities:
* Introduce bbp_edit_user_forums_role() and rename bbp_edit_user_role() to bbp_edit_user_blog_role().
* See #1939.
|
[4294]
|
johnjamesjacoby
|
Capabilities:
* Introduce bbp_get_default_role() in core/options.php and set default option value.
* See #1939.
|
[4335]
|
johnjamesjacoby
|
Capabilities:
* Introduce bbp_get_user_role_map() to more intelligently map !WordPress roles to bbPress roles.
* Use bbp_get_user_role_map() in bbp_set_current_user_default_role().
* See #1939.
* Fixes #2010.
|
[4293]
|
johnjamesjacoby
|
Capabilities:
* Introduce bbp_get_wp_roles() and use in place of $wp_roles global.
* See #1939.
|
[4289]
|
johnjamesjacoby
|
Capabilities:
* Introduce bbp_set_user_role() and add $context parameter to bbp_get_user_role().
* See #1939.
|
[4363]
|
johnjamesjacoby
|
Capabilities:
* Introduce bbp_user_has_profile() function in /users/capabilities.php.
* Use this function to suppress links to a profile of a user with no role on the site.
* Replaces some logic in bbp_parse_query() for setting user profile query variables.
* See #1939.
|
[4305]
|
johnjamesjacoby
|
Capabilities:
* Introduce bbp_user_register() and bbp_profile_update() sub-actions.
* See #1939.
|
[4365]
|
johnjamesjacoby
|
Capabilities:
* Introduce functionality for bulk-edit of user forums roles.
* Uses new 'keep_gate' capability to prevent granting keymaster role from a non-keymaster.
* For !WordPress 3.5 and higher.
* Props jmdodd.
* See #1939.
* Fixes #2016.
|
[4236]
|
johnjamesjacoby
|
Capabilities:
* Introduce sub-action for saving a users profile.
* Hook capability saving functions to this new action.
* Remove duplicate admin routine from /bbp-admin/bbp-users.php.
* Remove hardcoded capability saving from bbp_edit_user_handler().
* Add edit_user capability checks to cap save and reset functions.
* Fixes bug when caps would be lost when a user saves their own profile.
* Fixes #1963.
|
[4364]
|
johnjamesjacoby
|
Capabilities:
* Introduce two helper functions: bbp_filter_user_roles_option() and _bbp_reinit_dynamic_roles()
* Fixes bug where switching to a new blog would wipe out dynamically loaded roles.
* Filter the *_user_roles option, and add bbPress's roles to it.
* See #1939.
|
[4445]
|
johnjamesjacoby
|
Capabilities:
* Map caps to read_private_posts in forum/topic/reply read_ checks.
* Fixes debug notices and possible mapped caps from an unset object variable.
* Fixes #2039 (2.2 branch)
|
[4446]
|
johnjamesjacoby
|
Capabilities:
* Map caps to read_private_posts in forum/topic/reply read_ checks.
* Fixes debug notices and possible mapped caps from an unset object variable.
* Fixes #2039 (trunk)
|
[4419]
|
johnjamesjacoby
|
Capabilities:
* Moderators cannot see forums in wp-admin.
|
[4346]
|
johnjamesjacoby
|
Capabilities:
* Move status and role user functions out of users/functions.php and into users/capabilities.php.
* See #1939.
|
[4413]
|
johnjamesjacoby
|
Capabilities:
* Only loop through array keys in bbp_filter_blog_editable_roles().
* Prevents unused value variables from being created.
|
[4360]
|
johnjamesjacoby
|
Capabilities:
* Only setup the default current user role when the current user has been byref copied into bbPress's instance.
* Fixes issue where some core actions are suppressed during the deactivation process, causing an action order conflict with current_user.
* Fixes #1939.
|
[4431]
|
johnjamesjacoby
|
Capabilities:
* Only try to add the new role if there's a new role to add.
|
[4339]
|
johnjamesjacoby
|
Capabilities:
* PHP5'ize list table BBP_Users_Admin methods.
* See #2012.
|
[4165]
|
johnjamesjacoby
|
Capabilities:
* Reference correct function in bbp_add_caps()
* See #1939
|
[4375]
|
johnjamesjacoby
|
Capabilities:
* Rehook bbp_set_current_user_default_role() back to 'bbp_setup_current_user'.
* Now that deactivation check has moved, it's safe to hook this directly again.
* Remove from bbPress::setup_current_user().
* See #1939.
|
[4064]
|
johnjamesjacoby
|
Capabilities:
* Remap 'read' capability to moderator and lesser roles, since it will be needed by bbPress to read most things.
* Fixes #1887.
|
[4330]
|
johnjamesjacoby
|
Capabilities:
* Remove advanced capabilities code, template part, and UI helpers.
* This has been replaced by the forums roles selection.
* See #1939.
|
[4320]
|
johnjamesjacoby
|
Capabilities:
* Remove all previous forums roles in bbp_set_user_role().
* Use direct array intersection instead of bbp_get_user_role().
* Fixes issue where users can have more than 1 forum role.
* See #1939.
|
[4180]
|
johnjamesjacoby
|
Capabilities:
* Remove bbp_masked capability when setting the user role.
* Do not set a fake role in bbp_global_access_role_mask().
* Rename variable in bbp_global_access_role_mask() to be more literal.
* Add note to phpdoc of bbp_global_access_role_mask().
|
[4412]
|
johnjamesjacoby
|
Capabilities:
* Remove call to array_diff_assoc() in bbp_filter_blog_editable_roles().
* Use two foreach() loops instead.
* Randomly stopped working; no time before 2.2 to investigate.
|
[4319]
|
johnjamesjacoby
|
Capabilities:
* Remove caps before setting new role in bbp_profile_update_capabilities().
* See #1939.
|
[4222]
|
johnjamesjacoby
|
Capabilities:
* Remove experimental Bozo functionality. We can use the 'participate' to prevent forum participation without creating topics or replies.
* Introduce functions to reset, save, and remove user capabilities.
* Use these functions in both theme-side and admin-side profiles.
* Add capabilities to bbp-twentyten theme. This will be moved into the stand-alone bbp-twentyten theme soon'ish.
|
[4083]
|
johnjamesjacoby
|
Capabilities:
* Remove is_multisite() checks from role masking, to allow single-site installs with shared user tables to still mask roles.
* See #1894 (2.2 branch)
|
[4080]
|
johnjamesjacoby
|
Capabilities:
* Remove is_multisite() checks from role masking, to allow single-site installs with shared user tables to still mask roles.
* See #1894.
|
[4349]
|
johnjamesjacoby
|
Capabilities:
* Remove most capability mappings to 'participate' cap.
* Update bbp_set_current_user_default_role() to dynamically map a logged in user if global access is turned off.
* Provides alternative to users being granted a database role without taking any action.
* This makes bbPress work similarly to comments, though a decision needs to be made regarding profile pages for these "anonymous" users.
|
[4168]
|
johnjamesjacoby
|
Capabilities:
* Remove negative 'blocked' cap and use positive 'participate' cap instead.
* Replaces old 'bbp_participant' role nicely.
|
[4164]
|
johnjamesjacoby
|
Capabilities:
* Remove roles and move everything to mapped capabilities.
* First pass at admin-side forum capability manager.
* Deprecate moderator, anonymous, and participant roles and associated functions.
* Deprecate add/remove role/cap functions.
* More cap mapping needed for users that are not explicitly blocked.
* Adds cap check to forms for topic-tag adding/editing.
* See #1939
|
[4292]
|
johnjamesjacoby
|
Capabilities:
* Remove trailing whitespace in core/capabilities.php.
* See #1939.
|
[4354]
|
johnjamesjacoby
|
Capabilities:
* Rename 'anonymous' role to 'visitor' to avoid confusion with logged-out anonymity.
* Renames functions, keys, filters, et all.
* See #1939.
|
[4352]
|
johnjamesjacoby
|
Capabilities:
* Rename bbp_get_editable_roles() to bbp_get_dynamic_roles().
* This new function name better represents bbPress's approach to secondary user roles, in that these roles are no longer intentionally saved to the database.
* See #1939.
|
[4185]
|
johnjamesjacoby
|
Capabilities:
* Rename global role masking to bbp_set_current_user_default_role().
* Update phpdoc and action usages.
* See #1942.
|
[4367]
|
johnjamesjacoby
|
Capabilities:
* Reverse logic in bbp_user_has_profile().
* Assume all users have profiles, and they must be explicitly disabled.
* This is a more natural default behavior, as rarely will a site need to restrict a user's profile to a specific central site.
* See #1939.
|
[4066]
|
johnjamesjacoby
|
Capabilities:
* Revert r4064, as the 'read' capability is used to check for participant role mask.
* See #1887.
|
[4314]
|
johnjamesjacoby
|
Capabilities:
* Revert r4313.
* Remove negative 'blocked' capability; use not 'spectate' instead.
* See #1939.
|
[4244]
|
johnjamesjacoby
|
Capabilities:
* Separate capabilities into files for their respective components.
* Add minimum capability to topic views. (Assume no cap is public.)
* Make bbp_map_meta_caps a subaction, and move it to bbp-core-dependency.php.
* Introduce component meta map functions in each -caps.php file.
* Update bbp_current_user_can_see() to use capabilities instead of being a boolean switch.
* Working towards removing the need to add/remove caps to existing roles, allowing them to be strictly per user as needed.
|
[4433]
|
johnjamesjacoby
|
Capabilities:
* Set default param values in all map_meta_cap filters, incase none are passed or type cast correctly.
|
[4374]
|
johnjamesjacoby
|
Capabilities:
* Since bbp_set_current_user_default_role() is directly hooked to switch_blog, add deactivation check to prevent php warnings.
* See #1939.
|
[4336]
|
johnjamesjacoby
|
Capabilities:
* Switch default value of global access to 1.
* Fixes confusion about why users are not automatically added to forums.
* See #1939.
|
[4172]
|
johnjamesjacoby
|
Capabilities:
* Tweak CSS for capability UI to fix layout issues with varying height divs.
|
[4291]
|
johnjamesjacoby
|
Capabilities:
* Tweak phpdoc and cast type on return of bbp_use_advanced_capability_editor().
* See #1939.
|
[4301]
|
johnjamesjacoby
|
Capabilities:
* Update BBP_User_Admin to use roles UI instead of capabilities.
* Leave capabilities in for now, but hidden behind a switch function.
* See #1939.
|
[4306]
|
johnjamesjacoby
|
Capabilities:
* Update bbp-default templates to support new roles UI.
* See #1939.
|
[4302]
|
johnjamesjacoby
|
Capabilities:
* Update bbp_edit_user_blog_role() and bbp_edit_user_forums_role() to use appropriate functions to get role arrays.
* See #1939.
|
[4207]
|
johnjamesjacoby
|
Capabilities:
* Update bbp_get_user_display_role() to use special capabilities.
|
[4311]
|
johnjamesjacoby
|
Capabilities:
* Update bbp_map_primary_meta_caps() to block for inactive users, and check cap for active users.
* See #1939.
|
[4308]
|
johnjamesjacoby
|
Capabilities:
* Update bbp_profile_update_capabilities() to include saving forums roles.
* When saving a role, remove any individual forums capabilities that were set.
* Add some legacy caps to primary group, so they are correctly removed.
* See #1939.
|
[4297]
|
johnjamesjacoby
|
Capabilities:
* Update bbp_set_user_role() and bbp_get_user_role() to only work with bbPress forums roles.
* See #1939.
|
[4353]
|
johnjamesjacoby
|
Capabilities:
* Update inline doc for 'spectate' VS 'participate'.
* See #1939.
|
[4282]
|
johnjamesjacoby
|
Capabilities:
* Update mapped caps in map_settings_meta_caps().
* Fixes missing !BuddyPress and Akismet settings on single-site installations.
* Fixes #2000.
|
[4366]
|
johnjamesjacoby
|
Capabilities:
* Update notices in deprecated add/remove roles functions.
* See #1939.
|
[4186]
|
johnjamesjacoby
|
Capabilities:
* Update phpdoc for bbp_set_current_user_default_role().
* See #1942.
|
[4312]
|
johnjamesjacoby
|
Capabilities:
* Use bbp_get_current_user_id() in bbp_set_current_user_default_role().
* See #1939.
|
[4337]
|
johnjamesjacoby
|
Capabilities:
* Use bbp_get_default_role() in bbp_get_user_role_map().
* See #1939.
|
[4340]
|
johnjamesjacoby
|
Capabilities:
* Use bbp_get_user_role() to get the user's forums role.
* Update bbp_set_user_role() to return false if trying to set a role the user already has.
* Remove foreach loop to remove existing roles, since there's no way to naturally have more than one.
* See #1939.
|
[4298]
|
johnjamesjacoby
|
Capabilities:
* Use correct $roles variable in bbp_get_user_role().
* See #1939.
|
[4317]
|
johnjamesjacoby
|
Capabilities:
* Use correct 'bbp_set_user_role' filter name.
* Reset user caps when setting auto-role.
* See #1939.
|
[4206]
|
johnjamesjacoby
|
Capabilities:
* Use current_user_can( 'read' ) instead of is_user_member_of_blog() in bbp_set_current_user_default_role().
* Fixes issue where auto-role would not apply on single site, or multisite if user had orphaned caps.
|
[4541]
|
johnjamesjacoby
|
Capabilities:
* Verbiage change for forums role selector.
* Fixes #2079 (2.2 branch)
|
[4542]
|
johnjamesjacoby
|
Capabilities:
* Verbiage change for forums role selector.
* Fixes #2079 (trunk)
|
[4355]
|
johnjamesjacoby
|
Capabilities:
* When transitioning a user role, avoid giving them the visitor role unless explicitly intended.
* See #1939.
|
[6265]
|
netweb
|
Capabilities: Fix inline docs copy pasta introduced in [5852]
See #2685
|
[6571]
|
johnjamesjacoby
|
Capabilities: Logic improvements to help with per-forum moderation.
* Introduce `moderate_forum` capability check, used to check if a user has the ability to moderate a specific forum
* Limit number of direct `keep_gate` checks, and use `bbp_is_user_keymaster()` where possible
* Make `bbp_is_user_forum_moderator()` check the new `moderate_forum` mapped capability
* Have the `moderate` mapped capability check `moderate_forum` if the `$args[0]` can be bubbled up to being a forum ID
* Map admin post-type areas to their appropriate `edit_` capabilities – they are now properly handled via other mapped conditions
This change (along with r6567 & r6569) allows private & hidden forums to appear in forums queries for users who can moderate them.
|
[6561]
|
johnjamesjacoby
|
Capabilities: Skip double checks in `bbp_is_user_inactive()`, and use `bbp_get_user_id()` in `bbp_is_user_keymaster()`.
This change cleans up a few user capability functions, to use internal handlers and allow filters (like `bbp_get_user_id`) to be applied as expected in the given context.
|
[5852]
|
johnjamesjacoby
|
Capabilities: add `delete_posts` mappings to `delete` topic & reply checks.
This changeset ensures that capable users can delete their own topics & replies, when these capabilities are explicitly allowed already.
Props netweb, gusrb84. Fixes #2685.
|
[6975]
|
johnjamesjacoby
|
Capabilities: break instead of return.
This commit ensures that the relative _meta_caps filters continue to be executed within their expected contexts.
Previous to this change, certain mapped capability checks would bail out early and return $caps without the ability to filter the results.
With this change, mapped capabilities can now be filtered more logically and inline with the rest of the surrounding logic.
For 2.7, trunk.
|
[6972]
|
johnjamesjacoby
|
Capabilities: break instead of return;
This commit ensures that the relative `_meta_caps` filters continue to be executed within their expected contexts.
Previous to this change, certain mapped capability checks would bail out early and return `$caps` without the ability to filter the results.
With this change, mapped capabilities can now be filtered more logically and inline with the rest of the surrounding logic.
For 2.6.2.
|
[6714]
|
johnjamesjacoby
|
Capabilities: first pass at single topic-tag cap mappings.
This change adds IDs where appropriate, and introduces single term cap checks with intelligent comparisons that match the approach used by forums, topics, and replies.
* Inactive users cannot assign, manage, edit, or delete
* Moderators can assign, manage, edit, and delete
* Participants can assign
* Spectators & Blocked users still cannot manipulate topic tags in any way
This prepares bbPress for third-party plugins to leverage topic-tags in ways it otherwise wasn't prepared to do.
See #3167.
|
[6713]
|
johnjamesjacoby
|
Capabilities: prevent edits when past the edit-lock time.
This change increases the priority of the `moderator` check, so that moderators are not subjected to edit-lock restrictions, and maps to `do_not_allow` for topic/reply authors who normally can edit but are now beyond the allotted time period.
Fixes #3164. Props SergeyBiryukov.
|
[2866]
|
johnjamesjacoby
|
Capital P... Dangit! Props westi.
|
[5215]
|
johnjamesjacoby
|
Capitalize `bbpress::instance();` to `bbPress::instance()` to avoid class/function confusion.
|
[4219]
|
johnjamesjacoby
|
Caps:
* Prevent users from seeing their own caps if allowed in wp-admin.
|
[6783]
|
johnjamesjacoby
|
Caps: Check for `$args[0]` and bail if empty.
This change avoids debug notices when single forum/topic/reply capability checks are done without having passed in a post ID.
Props espellcaste, chriscct7. Fixes #3190.
|
[2957]
|
johnjamesjacoby
|
Carry over the view=all query arguments into other appropriate forum/topic/reply links on the forum pages. This eliminates the inconsistent user experience of asking to view trashed/spammed topics or replies, and being taken to pages where you cannot see those topics/replies.
|
[2851]
|
johnjamesjacoby
|
Cast return values as (int) where appropriate. Adjust _last_ functions to be more friendly with anonymous user data. Test some logic with _last_ forum/topic/reply where if reply_id does not exist, fall back to topic_id. Remove various strict empty string checks as they should no longer be needed.
|
[3133]
|
johnjamesjacoby
|
Cast return values of bbp_get_hidden_form_ids() and bbp_get_private_forum_ids() to prevent debug notices when both of these values exist but are single values or empty strings.
|
[5593]
|
johnjamesjacoby
|
Cast value as `(int)` in `bbp_get_form_forum_parent()`, ensuring it is numerical for the remaining call stack. See #2742.
|