Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added `COMPONENT_VIEW` permission.

  • Loading branch information...
commit d61773787c77c45fa529c248dbddfa6c34ffe7b8 1 parent 5947cae
Mitar authored

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 1 componentpermissions/api.py
4 componentpermissions/api.py
@@ -26,6 +26,8 @@ def _get_permission_name(self, component):
26 26 return None
27 27
28 28 def get_permission_actions(self):
  29 + yield 'COMPONENT_VIEW'
  30 +
29 31 for component in model.Component.select(self.env):
30 32 permission = self._get_permission_name(component.name)
31 33 if permission:
@@ -54,5 +56,5 @@ def check_permission(self, action, username, resource, perm):
54 56
55 57 if should_check_permissions and int(should_check_permissions) and 'component' in ticket.values:
56 58 permission = self._get_permission_name(ticket['component'])
57   - if permission and permission not in perm and 'TICKET_ADMIN' not in perm:
  59 + if permission and permission not in perm and 'COMPONENT_VIEW' not in perm:
58 60 return False

0 comments on commit d617737

Please sign in to comment.
Something went wrong with that request. Please try again.