/sun/hostcaptain/trunk/src/ak/hostcaptain/core/action/UserAction.java |
---|
137,6 → 137,9 |
u.setBoss(user, null); |
else |
u.setBoss(user, UserManager.getInstance().get(user, bossId)); |
u.setEnabled(user, (Boolean)theForm.get("enabled")); |
u.setComment(user, (String)theForm.get("comment")); |
} |
if(u.mayChangeSuperuser(user)) |
149,9 → 152,6 |
u.setPassword(user, password); |
} |
u.setEnabled((Boolean)theForm.get("enabled")); |
u.setComment((String)theForm.get("comment")); |
UserManager.getInstance().save(user, u); |
response.sendRedirect(BackPath.findBackPath(request).getBackwardUrl()); |
return null; |
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/model/GeneralModelObject.java |
---|
1,6 → 1,8 |
package ak.hostcaptain.core.model; |
import java.util.Date; |
import ak.hostcaptain.util.ModelException; |
import ak.hostcaptain.util.ModelSecurityException; |
public abstract class GeneralModelObject |
implements ModelObject |
24,6 → 26,15 |
this.enabled = enabled; |
} |
public void setEnabled(User editor, Boolean enabled) |
throws ModelException |
{ |
if(!editableBy(editor)) |
throw new ModelSecurityException(); |
this.enabled = enabled; |
} |
/** |
* |
* @hibernate.property |
38,6 → 49,15 |
this.comment = comment; |
} |
public void setComment(User editor, String comment) |
throws ModelException |
{ |
if(!editableBy(editor)) |
throw new ModelSecurityException(); |
this.comment = comment; |
} |
/** |
* |
* @hibernate.timestamp column="mod_stamp" |
/sun/hostcaptain/trunk/bin/dos2unix.sh |
---|
0,0 → 1,4 |
#!/bin/sh |
find . -not -path '*/.svn/*' \( -name '*.java' -or -name '*.jsp' -or -name '*.tld' -or -name '*.xml' \) -exec sh -c 'tr -d "\r" < {} > tmp; mv tmp {}' \; |