Skip to content

Commit 51a416d

Browse files
authored
feat: allow group member management for whitelisted group IDs (#8)
1 parent 953bf38 commit 51a416d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ GATE_VPN_SSL_PVTKEY=
2727
NEWRELIC_AGENT_ENABLED=false
2828
NEWRELIC_LICENSE_KEY=
2929
NEWRELIC_APP_NAME=Gate
30-
GATE_GUARDIAN_URL=
30+
GATE_GUARDIAN_URL=
31+
GATE_GROUP_ALLOWED_MANAGE_GROUP_MEMBERSHIP=

app/views/groups/show.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
| Raise access request in
7474
a href="#{ENV['GATE_GUARDIAN_URL']}" target="_blank" Guardian
7575
| to join this group
76-
- if current_user.admin
76+
- 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))
7777
.h7 Assign members
7878
= form_tag add_user_to_group_path(@group.id), method: :post do
7979
.row

0 commit comments

Comments
 (0)