Class: Ability

Inherits:
Object
  • Object
show all
Includes:
CanCan::Ability
Defined in:
app/models/ability.rb

Overview

v0.0.1

2023-12-26

Instance Method Summary collapse

Constructor Details

#initialize(user) ⇒ Ability

Returns a new instance of Ability.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/models/ability.rb', line 9

def initialize(user)

  if user

    if [ '[email protected]', '[email protected]', '[email protected]', '[email protected]' ].include? user.email
      can :manage, :all
    end

  end

  can [ :open_permission ], Wco
  can [ :show ], Wco::ObfuscatedRedirect
  # can [ :open_permission ], WcoEmail

end