Skip to content

Commit

Permalink
Merge branch 'development' of github.com:dtolabs/rundeck into develop…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
ahonor committed Dec 6, 2010
2 parents b399d50 + a20d63a commit 24eb97c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 89 deletions.
2 changes: 1 addition & 1 deletion packaging/rundeck.spec
Expand Up @@ -51,7 +51,7 @@ fi
%config /etc/rundeck/server/realm.properties
%config /etc/rundeck/server/rundeck-config.properties

%attr(1775, rundeck, rundeck) %dir /var/log/rundeck
%attr(6775, rundeck, rundeck) %dir /var/log/rundeck
%dir /var/lib/rundeck
%dir /var/lib/rundeck/logs
%dir /var/lib/rundeck/data
Expand Down
17 changes: 2 additions & 15 deletions rundeckapp/grails-app/controllers/UserController.groovy
Expand Up @@ -72,7 +72,7 @@ class UserController {
return render(template:"/common/error")
}
}
[user:u,authorization:u.authorization]
[user:u]
}
def create={
render(view:'register',model:[user:new User(),newuser:true])
Expand All @@ -88,7 +88,7 @@ class UserController {
u = new User(login:params.login,authorization:UserAuth.createDefault())
u.dashboardPref="1,2,3,4"

def model=[user: u,authorization:u.authorization,newRegistration:true]
def model=[user: u,newRegistration:true]
return model
}
def store={
Expand All @@ -104,12 +104,6 @@ class UserController {
}
u = new User(params.subMap(['login','firstName','lastName','email']))

if(roleService.isUserInAnyRoles(request,['admin','user_admin'])){
//allow modifying authorizations only if admin/user_admin
u.authorization=new UserAuth(params.authorization)
}else{
u.authorization = UserAuth.createDefault()
}
if(!u.save(flush:true)){
def errmsg= u.errors.allErrors.collect { g.message(error:it) }.join("\n")
flash.error="Error updating user: ${errmsg}"
Expand All @@ -134,13 +128,6 @@ class UserController {

bindData(u,params.subMap(['firstName','lastName','email']))

if(roleService.isUserInAnyRoles(request,['admin','user_admin'])){
bindData(u.authorization,params.authorization)
}

if(!u.authorization){
u.authorization = UserAuth.createDefault()
}
if(!u.save(flush:true)){
def errmsg= u.errors.allErrors.collect { g.message(error:it) }.join("\n")
flash.error="Error updating user: ${errmsg}"
Expand Down
5 changes: 0 additions & 5 deletions rundeckapp/grails-app/services/UserService.groovy
Expand Up @@ -18,11 +18,6 @@ class UserService {

def boolean userHasAuthorization(String login, String auth){

// def User user = User.findByLogin(login)
// if(!user){
// return false;
// }
// return user.authorization[auth]?true:false
throw new Exception("Not supported.")
}
}
68 changes: 0 additions & 68 deletions rundeckapp/grails-app/views/user/_userAuthView.gsp

This file was deleted.

0 comments on commit 24eb97c

Please sign in to comment.