Class: Decidim::ParticipatorySpacePrivateUser
Overview
This class gives a given User access to a given private ParticipatorySpacePrivateUser
Constant Summary
Decidim::ParticipatorySpaceUser::ROLES
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.export_serializer ⇒ Object
.log_presenter_class_for(_log) ⇒ Object
.ransackable_associations(_auth_object = nil) ⇒ Object
41
42
43
|
# File 'decidim-core/app/models/decidim/participatory_space_private_user.rb', line 41
def self.ransackable_associations(_auth_object = nil)
%w(user)
end
|
.ransackable_attributes(auth_object = nil) ⇒ Object
35
36
37
38
39
|
# File 'decidim-core/app/models/decidim/participatory_space_private_user.rb', line 35
def self.ransackable_attributes(auth_object = nil)
return [] unless auth_object&.admin?
%w(name nickname email invitation_accepted_at last_sign_in_at invitation_sent_at role)
end
|
.user_collection(user) ⇒ Object
19
20
21
|
# File 'decidim-core/app/models/decidim/participatory_space_private_user.rb', line 19
def self.user_collection(user)
where(decidim_user_id: user.id)
end
|
Instance Method Details
#target_space_association ⇒ Object
45
|
# File 'decidim-core/app/models/decidim/participatory_space_private_user.rb', line 45
def target_space_association = :privatable_to
|