Class: Lesli::Descriptor

Inherits:
ApplicationLesliRecord show all
Defined in:
app/models/lesli/descriptor.rb

Defined Under Namespace

Classes: Privilege

Instance Method Summary collapse

Instance Method Details

#initialize_descriptor_privilegesObject



47
48
49
50
51
52
53
54
55
# File 'app/models/lesli/descriptor.rb', line 47

def initialize_descriptor_privileges

    descriptor_operator = DescriptorPrivilegeOperator.new(self)
    
    descriptor_operator.add_profile_privileges(self) if self.name == "profile"

    descriptor_operator.add_owner_privileges(self) if ["owner", "admin"].include?(self.name)
    
end