Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F905146
20180726141603_add_admin_to_users.rb
No One
Temporary
Actions
Download 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
Fri, Aug 29, 9:32 PM
Size
234 B
Mime Type
text/x-ruby
Expires
Sun, Aug 31, 9:32 PM (9 h, 34 m)
Engine
blob
Format
Raw Data
Handle
252503
Attached To
rWEBDNS WebDNS (edet4)
20180726141603_add_admin_to_users.rb
View Options
class
AddAdminToUsers
<
ActiveRecord
::
Migration
def
change
add_column
:users
,
:admin
,
:boolean
User
.
find_each
do
|
u
|
u
.
admin
=
u
.
groups
.
where
(
name
:
WebDNS
.
settings
[
:admin_group
]
)
.
exists?
u
.
save
end
end
end
Event Timeline
Log In to Comment