return !StringUtils.isEmpty(originRepository);\r
}\r
\r
+ public boolean isOwner(String username) {\r
+ return owner != null && username != null && owner.equalsIgnoreCase(username);\r
+ }\r
+ \r
public boolean isPersonalRepository() {\r
return !StringUtils.isEmpty(projectPath) && projectPath.charAt(0) == '~';\r
}\r
}\r
\r
private UserModel() {\r
- this.username = "anonymous";\r
+ this.username = "$anonymous";\r
this.isAuthenticated = false;\r
}\r
\r
}\r
\r
UserModel user = GitBlitWebSession.get().getUser();\r
+ if (user == null) {\r
+ user = UserModel.ANONYMOUS;\r
+ }\r
Fragment repositoryLinks;\r
- boolean showOwner = user != null && user.username.equalsIgnoreCase(entry.owner);\r
+ boolean showOwner = entry.isOwner(user.username);\r
// owner of personal repository gets admin powers\r
boolean showAdmin = isAdmin || entry.isUsersPersonalRepository(user.username);\r
\r