I have a view method which needs to enable certain html for the super
user  to edit/modify/unpublish the content.

def view(self, id):
        identity = request.environ.get('repoze.who.identity')
        db_session = meta.Session()
        data_model = db_session.query(model.DataModel).filter_by
(id=id).first()

        ??????

How to check whether user has appropriate permission to enable html
tags?

I am successfully using decorator to protect the action like below. I
want to know how to  call has_permission method?

@ActionProtector(has_permission('post'), cool_denial_handler)
    def edit(self, id):
        db_session = meta.Session()
        .....

Thanks

--~--~---------~--~----~------------~-------~--~----~
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