Opened 17 years ago
Closed 15 years ago
#6439 closed task (worksforme)
trac could display LoginForm for not loged user's instead Error: Forbidden
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Why?
It's very confusedly (special for new users) when the first what He see is error:
Error: Forbidden WIKI_VIEW privileges are required to perform this operation on WikiStart
Simple catching this error and checking: "User is logged or not" could create much more comfortable environment to work.
Attachments (0)
Change History (11)
comment:1 by , 17 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
follow-up: 3 comment:2 by , 17 years ago
Of course that plugin can correct this problem, but I don't see any reason, why not fix it in trac core.
comment:3 by , 17 years ago
Replying to Dawid Polak <dawid@mentax.pl>:
Of course that plugin can correct this problem, but I don't see any reason, why not fix it in trac core.
The message with WIKI_VIEW is mostly seen when anonymous user is not allowed to browse the WikiStart page, that is logging in on the system is required to access the project.
In such a case, it is usually recommended to define the permission rules (Apache) on the project root URL (i.e. http://server/trac/project
) rather than only on /login
(i.e. http://server/trac/project/login
).
When such a configuration is enabled, the user gets prompted for his credentials whenever it attemps to access the Wiki and does not get the WIKI_VIEW error message as long as he provides a valid login/password pair.
comment:4 by , 17 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
In such a case, it is usually recommended to define the permission rules (Apache) on the project …
Maybe it is true, but the 0.11 is public with LoginModule (trac.web.auth) in standard. And the Module could be correct serve for any standard installation.
Maybe the simple path can be used, especially because when system us the Apache auth, this newer occur (and can't broke anything) :
except PermissionError, e: if req.authname == 'anonymous': req.redirect( req.href( 'login', {'referer':req.href(req.path_info)} ) ) raise HTTPForbidden(to_unicode(e))
comment:5 by , 17 years ago
Unfortunately - it's not complete solution.
Why?
Because (I don't know why) the wiki module in source:/trunk/trac/wiki/web_ui.py@6264#L94 check the user right's in match_request
(from [5514]) .
Maybe it's some optimization hack, I don't know, but any other module don't do this in this place, and it's not look correct or compatible with TracDev/SecurityBranch
comment:6 by , 17 years ago
Milestone: | 0.11 |
---|
comment:8 by , 17 years ago
Keywords: | verify added |
---|---|
Milestone: | → 0.11.1 |
comment:9 by , 17 years ago
Keywords: | verify removed |
---|---|
Milestone: | 0.11.1 |
Resolution: | → duplicate |
Status: | reopened → closed |
This is a duplicate of #5340. This ticket contains more discussion, but the other ticket came first + contains a patch. Flipped a coin and decided to close this ticket as a duplicate. Please do continue the discussion there.
comment:10 by , 15 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
I agree this should be built into the trac core. Our system is on a hosted shared server (we do not have access to Apache at all). It would be a ten minute fix to just do as the original poster said. Or simply add a new line to the .ini where this super annoying message could be re-worded!
comment:11 by , 15 years ago
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
In 0.12, in addition to the error message, you're also told to try to login, with a link for doing so.
Use the PermRedirect plugin.