Hide warning messages on bottom when user is not admin
FEA: ItEr75S04BugFixing
This commit is contained in:
parent
bb31a38392
commit
eb486c14c2
4 changed files with 15 additions and 1 deletions
|
|
@ -56,4 +56,6 @@ public interface ITemplateModel {
|
|||
|
||||
String getIdUser(String login);
|
||||
|
||||
boolean isUserAdmin();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,4 +177,9 @@ public class TemplateController extends GenericForwardComposer {
|
|||
public String getIdWswriterUser() {
|
||||
return templateModel.getIdUser(MandatoryUser.WSWRITER.getLoginName());
|
||||
}
|
||||
|
||||
public boolean isUserAdmin() {
|
||||
return templateModel.isUserAdmin();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ import org.libreplan.business.scenarios.entities.OrderVersion;
|
|||
import org.libreplan.business.scenarios.entities.Scenario;
|
||||
import org.libreplan.business.users.daos.IUserDAO;
|
||||
import org.libreplan.business.users.entities.User;
|
||||
import org.libreplan.web.UserUtil;
|
||||
import org.libreplan.web.security.SecurityUtils;
|
||||
import org.libreplan.web.users.bootstrap.MandatoryUser;
|
||||
import org.libreplan.web.users.services.CustomUser;
|
||||
|
|
@ -477,4 +478,10 @@ public class TemplateModel implements ITemplateModel {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public boolean isUserAdmin() {
|
||||
return UserUtil.getUserFromSession().isAdministrator();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ signature="java.lang.Boolean isDefaultPasswordsControl()"?>
|
|||
</borderlayout>
|
||||
|
||||
</center>
|
||||
<south border="none">
|
||||
<south border="none" if="${templateCtrl.userAdmin}">
|
||||
<n:table width="100%">
|
||||
<n:tr class="footer">
|
||||
<n:td valign="center">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue