Example #1
0
 def is_publisher(self):
     """Checks if the current user has publisher rights
     """
     from bika.lims.permissions import Publish
     roles = api.get_roles_for_permission(Publish, self.context)
     return self.user.has_role(roles)
Example #2
0
 def is_manager(self):
     """Checks if the current user has manager rights
     """
     from bika.lims.permissions import ManageBika
     roles = api.get_roles_for_permission(ManageBika, self.context)
     return self.user.has_role(roles)