Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F1090608
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Oct 15, 9:12 AM
Size
611 B
Mime Type
text/x-diff
Expires
Fri, Oct 17, 9:12 AM (5 h, 6 m)
Engine
blob
Format
Raw Data
Handle
280229
Attached To
rARCHIVING archiving
View Options
diff --git a/app/models/user.rb b/app/models/user.rb
index 841a3e3..ca010b8 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1,10 +1,17 @@
class User < ActiveRecord::Base
establish_connection Baas::settings[:local_db]
has_many :ownerships
has_many :hosts, through: :ownerships, inverse_of: :users
enum user_type: { institutional: 0, vima: 1, okeanos: 2, admin: 3 }
validates :username, :user_type, presence: true
+
+ # Composes the user's display name from the user's username and email
+ #
+ # @return [String]
+ def display_name
+ "#{username} <#{email}>"
+ end
end
Event Timeline
Log In to Comment