Exemple #1
0
 def has_add_permission(self, objects):
     if not current_user.has_permission('create_product_config'):
         return False
     for obj in objects:
         if not current_user.has_store_access(obj.store_id):
             return False
     return True
Exemple #2
0
 def has_add_permission(self, objects):
     if not current_user.has_permission('create_registration_detail'):
         return False
     for obj in objects:
         if not current_user.has_store_access(obj.store_id):
             return False
     return True
Exemple #3
0
 def has_delete_permission(self, obj):
     return current_user.has_store_access(obj.store_id) and \
            current_user.has_permission('delete_registration_detail')
Exemple #4
0
 def has_delete_permission(self, obj):
     return current_user.has_store_access(obj.store_id) and current_user.has_permission('delete_printer_config')
Exemple #5
0
 def has_delete_permission(self, obj):
     if current_user.has_permission('delete_user_stores') and current_user.has_store_access(obj.store_id):
         return True
     return False
Exemple #6
0
 def has_add_permission(self, obj, data):
     if current_user.has_permission('add_user_stores'):
         if not current_user.has_store_access(data['store_id']):
             return False
         return True
     return False
Exemple #7
0
 def has_change_permission(self, obj, data):
     if current_user.has_permission('change_user_stores') and current_user.has_store_access(obj.store_id):
         return True
     return False