Opened 15 years ago
Closed 15 years ago
#1684 closed defect (bug) (fixed)
More robust template redirect needed
| Reported by: | johnjamesjacoby | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.1 |
| Component: | Component - Users | Version: | 2.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
bbPress uses WordPress's capabilities API to ensure that only authorized users are able to perform certain tasks. What it doesn't have currently is a way to consistently redirect unauthorized users away from pages they might not belong at.
Right now some code is in a pre_get_posts filter, while some other are littered around their specific template loaders. This makes it difficult to see what's redirecting when, and why.
Change History (2)
#2
@
15 years ago
- Resolution → fixed
- Status new → closed
(In [3607]) Introduce bbp_template_redirect() and use for checking various edit screens:
- Introduce bbp_check_forum_edit() to check for forum edit
- Introduce bbp_check_topic_edit() to check for topic edit
- Introduce bbp_check_reply_edit() to check for reply edit
- Introduce bbp_check_topic_tag_edit() to check for topic tag edit
- Introduce bbp_check_user_edit() to check for user edit
- Remove these checks from bbp_pre_get_posts() and only use it to setup query vars
- Fixes #1684, r3605
- For 2.1 (plugin) branch
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
(In [3605]) Introduce bbp_template_redirect() and use for checking various edit screens: