Skip to content

Commit

Permalink
feat: allow group member management for whitelisted group IDs (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
rahmatrhd authored Oct 14, 2024
1 parent 953bf38 commit 51a416d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ GATE_VPN_SSL_PVTKEY=
NEWRELIC_AGENT_ENABLED=false
NEWRELIC_LICENSE_KEY=
NEWRELIC_APP_NAME=Gate
GATE_GUARDIAN_URL=
GATE_GUARDIAN_URL=
GATE_GROUP_ALLOWED_MANAGE_GROUP_MEMBERSHIP=
2 changes: 1 addition & 1 deletion app/views/groups/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
| Raise access request in
a href="#{ENV['GATE_GUARDIAN_URL']}" target="_blank" Guardian
| to join this group
- if current_user.admin
- if current_user.admin or (@group.admin?(current_user) and ENV['GATE_GROUP_ALLOWED_MANAGE_GROUP_MEMBERSHIP'] && ENV['GATE_GROUP_ALLOWED_MANAGE_GROUP_MEMBERSHIP'].split(',').include?(@group.id.to_s))
.h7 Assign members
= form_tag add_user_to_group_path(@group.id), method: :post do
.row
Expand Down

0 comments on commit 51a416d

Please sign in to comment.