Secure Controller not working with ldap demo code
I used the demo example given with the ldap plugin and then I wrote a simple secure controller like this:
class SecureControlle
allow_only = not_anonymous(
@expose('json')
@require(
def check(self):
return 'Inside'
and my predicate is:
class is_a_manager(
message = 'You do not have enough privileges to access this resource'
def evaluate(self, environ, credentials):
for (key, value) in request.
if key == "x-PrivilegeName" and "manage" not in value:
Now :
Everytime I navigate to /about, login and then navigate to this url(/secc/check), it returns a login page and the log says:
"2010-04-20 20:25:51,430 Authorization denied: The current user must have been authenticated" but the user has already been authenticated in the first step. This does not happen if I remove the "allow_only = not_anonymous(
Any ideas why ?
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- Gustavo Narea Edit question
- Solved by:
- abhi@littlewiki.in
- Solved:
- Last query:
- Last reply: