Expose the user's first name for use in the Identity template.
This commit is contained in:
parent
4282da5ef2
commit
558bcfb13f
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue