2
0
mirror of https://github.com/HangarMC/Hangar.git synced 2025-03-19 15:40:50 +08:00

fixed owner starring own project

This commit is contained in:
Jake Potrebic 2020-09-03 11:39:09 -07:00
parent e6ffe6c1c2
commit dbc536b7e5
No known key found for this signature in database
GPG Key ID: 7C58557EC9C421F8
2 changed files with 2 additions and 1 deletions
src/main
java/io/papermc/hangar/model/viewhelpers
resources/templates/projects

@ -53,6 +53,7 @@ public class ProjectData extends JoinableData<UserProjectRolesTable, ProjectsTab
}
public boolean isOwner(UsersTable usersTable) {
if (usersTable == null) return false;
return projectOwner.getId() == usersTable.getId();
}

@ -88,7 +88,7 @@ Base template for Project overview.
-->
<#if p.visibility != Visibility.SOFTDELETE>
<#if headerData.hasUser() && p.isOwner(headerData.getCurrentUser())>
<#if !p.isOwner(headerData.getCurrentUser())>
<button class="btn btn-default btn-star">
<i id="icon-star" <#if sp.starred>
class="fas fa-star"