Expose the user's first name for use in the Identity template.

This commit is contained in:
j2blake 2011-06-14 17:16:37 +00:00
parent 4282da5ef2
commit 558bcfb13f

View file

@ -41,6 +41,14 @@ public class User extends BaseTemplateModel {
return firstName + " " + lastName;
}
public String getFirstName() {
if (currentUser == null) {
return "";
} else {
return currentUser.getFirstName();
}
}
public boolean getHasSiteAdminAccess() {
return PolicyHelper.isAuthorizedForActions(vreq, SiteAdminController.REQUIRED_ACTIONS);
}