X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a6439c7ddc3407193889386051f06df2a1e74ea9..ec07cd1ad893c15d94844b3cf2d8d95ae5cfd611:/services/api/app/models/user.rb diff --git a/services/api/app/models/user.rb b/services/api/app/models/user.rb index 81cae987a2..8743b92b25 100644 --- a/services/api/app/models/user.rb +++ b/services/api/app/models/user.rb @@ -1,7 +1,11 @@ +require 'can_be_an_owner' + class User < ArvadosModel - include AssignUuid + include HasUuid include KindAndEtag include CommonApiTemplate + include CanBeAnOwner + serialize :prefs, Hash has_many :api_client_authorizations before_update :prevent_privilege_escalation @@ -177,6 +181,10 @@ class User < ArvadosModel protected + def ensure_ownership_path_leads_to_user + true + end + def permission_to_update # users must be able to update themselves (even if they are # inactive) in order to create sessions