additional check for restricted editing permission
This commit is contained in:
		
							parent
							
								
									0555329e86
								
							
						
					
					
						commit
						77bf66996a
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		|  | @ -75,6 +75,7 @@ from loops.organize.util import getRolesForPrincipal | |||
| from loops.resource import Resource | ||||
| from loops.security.common import checkPermission | ||||
| from loops.security.common import canAccessObject, canListObject, canWriteObject | ||||
| from loops.security.common import canEditRestricted | ||||
| from loops.type import ITypeConcept, LoopsTypeInfo | ||||
| from loops import util | ||||
| from loops.util import _, saveRequest | ||||
|  | @ -867,6 +868,10 @@ class BaseView(GenericView, I18NView, SortableMixin): | |||
|     def canAccessRestricted(self): | ||||
|         return checkPermission('loops.ViewRestricted', self.context) | ||||
| 
 | ||||
|     @Lazy | ||||
|     def canEditRestricted(self): | ||||
|         return canEditRestricted(self.context) | ||||
| 
 | ||||
|     def openEditWindow(self, viewName='edit.html'): | ||||
|         if self.editable: | ||||
|             if checkPermission('loops.ManageSite', self.context): | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue