Parent

User

Access levels

0 (Contributor)

Can see own drafts, can fill in requests

1 (Padawan)

all of the above, plus see and edit all drafts

2 (Full member)

all of the above, plus voting

3 (Confidential member)

all of the above, including restricted drafts

Public Instance Methods

can_access?(glsa) click to toggle source

Checks access to a given GLSA

# File app/models/user.rb, line 44
def can_access?(glsa)
  return false if access == 0 and not glsa.is_owner? self
  return false if access < 3 and glsa.restricted
  
  true
end
get_pref_category(category) click to toggle source

Returns a certain category form the user’s preferences or an empty hash if that category does not exist

# File app/models/user.rb, line 57
def get_pref_category(category)
  return {} if self.preferences == nil or self.preferences[category] == nil
  
  self.preferences[category]
end
is_el_jefe?() click to toggle source

Is the user an admin? ;)

# File app/models/user.rb, line 39
def is_el_jefe?
  self.jefe
end
to_s() click to toggle source
# File app/models/user.rb, line 51
def to_s
  "#{name} (#{login})"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.