Hi All,

We allow user to create the content if the user is a member of the
site and he has to login into the site. This can be done through
@authorize(ValidAuthKitUser()).


But we will allow the user to create the content only if he has rights
to create content. So I wanted to check the logined user's role before
allowing him to create new content.


Can do like this?

    @authorize(ValidAuthKitUser(), HasRoleIn(['Create']))
    def new(self):
        c.title = "Create new Deal"
        return render('deal_create.html')

Where I can implement my own verification for HasRoleIn class?

Regards,

Krish
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to