6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'app/permissions/decidim/assemblies/permissions.rb', line 6
def permissions
user_can_enter_space_area?
return permission_action if assembly && !assembly.is_a?(Decidim::Assembly)
if read_admin_dashboard_action?
user_can_read_admin_dashboard?
return permission_action
end
if permission_action.scope == :public
public_list_assemblies_action?
public_read_assembly_action?
public_list_members_action?
return permission_action
end
return permission_action unless user
if !has_manageable_assemblies? && !user.admin?
disallow!
return permission_action
end
return permission_action unless permission_action.scope == :admin
user_can_read_assembly_list?
user_can_list_assembly_list?
user_can_read_current_assembly?
user_can_create_assembly?
user_can_export_assembly?
user_can_copy_assembly?
org_admin_action?
assemblies_type_action?
return permission_action unless assembly
user_can_read_private_users?
moderator_action?
collaborator_action?
valuator_action?
assembly_admin_action?
permission_action
end
|