Skip to content

Commit

Permalink
chore: Add additional test server admin (#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
bensofficial authored Feb 24, 2025
1 parent aeba59c commit e6a9f04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/src/app/core/services/permission.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class PermissionService {
enabled: () => !!this.repositoryService.currentRepositoryId() && !!this.keycloak.isLoggedIn(),
}));

heliosDevelopers = ['gbanu', 'thielpa', 'egekocabas', 'turkerkoc', 'stefannemeth'];
heliosDevelopers = ['gbanu', 'thielpa', 'egekocabas', 'turkerkoc', 'stefannemeth', 'bensofficial'];
isHeliosDeveloper = computed(() => !!this.keycloak.profile?.username && this.heliosDevelopers.includes(this.keycloak.profile.username.toLowerCase()));

hasWritePermission = computed(() => this.permissionsQuery.data()?.permission === 'WRITE' || this.permissionsQuery.data()?.permission === 'ADMIN' || this.isHeliosDeveloper());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ private Collection<GrantedAuthority> getGithubRepositoryAuthorities(
Collection<GrantedAuthority> authorities = new ArrayList<>();

// Hardcoded Helios developers
String[] heliosDevelopers = {"gbanu", "thielpa", "egekocabas", "turkerkoc", "stefannemeth"};
String[] heliosDevelopers = {
"gbanu", "thielpa", "egekocabas", "turkerkoc", "stefannemeth",
"bensofficial"
};
if (Arrays.asList(heliosDevelopers).contains(username)) {
authorities.add(new SimpleGrantedAuthority(rolePrefix + RepoPermissionType.ADMIN));
return authorities;
Expand Down

0 comments on commit e6a9f04

Please sign in to comment.