Skip to content

Commit

Permalink
[webui] Change the creation of home project after creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Moisés Déniz Alemán committed Aug 20, 2015
1 parent 7b09fff commit 005c08c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/app/models/user.rb
Expand Up @@ -51,10 +51,10 @@ def self.password_hash_types
default_password_hash_types
end

after_save :create_home_project
after_create :create_home_project

def create_home_project
Project.find_or_create_by(name: "home:#{login}")
Project.find_or_create_by(name: "home:#{login}") if can_create_project?("home:#{login}")
end

# When a record object is initialized, we set the state, password
Expand Down

0 comments on commit 005c08c

Please sign in to comment.