@@ -18,6 +18,12 | |||
|
18 | 18 | class Principal < ActiveRecord::Base |
|
19 | 19 | self.table_name = "#{table_name_prefix}users#{table_name_suffix}" |
|
20 | 20 | |
|
21 | # Account statuses | |
|
22 | STATUS_ANONYMOUS = 0 | |
|
23 | STATUS_ACTIVE = 1 | |
|
24 | STATUS_REGISTERED = 2 | |
|
25 | STATUS_LOCKED = 3 | |
|
26 | ||
|
21 | 27 | has_many :members, :foreign_key => 'user_id', :dependent => :destroy |
|
22 | 28 | has_many :memberships, :class_name => 'Member', :foreign_key => 'user_id', :include => [ :project, :roles ], :conditions => "#{Project.table_name}.status<>#{Project::STATUS_ARCHIVED}", :order => "#{Project.table_name}.name" |
|
23 | 29 | has_many :projects, :through => :memberships |
@@ -20,12 +20,6 require "digest/sha1" | |||
|
20 | 20 | class User < Principal |
|
21 | 21 | include Redmine::SafeAttributes |
|
22 | 22 | |
|
23 | # Account statuses | |
|
24 | STATUS_ANONYMOUS = 0 | |
|
25 | STATUS_ACTIVE = 1 | |
|
26 | STATUS_REGISTERED = 2 | |
|
27 | STATUS_LOCKED = 3 | |
|
28 | ||
|
29 | 23 | # Different ways of displaying/sorting users |
|
30 | 24 | USER_FORMATS = { |
|
31 | 25 | :firstname_lastname => { |
General Comments 0
You need to be logged in to leave comments.
Login now