mirror of
https://github.com/status-im/open-bounty.git
synced 2025-01-23 16:01:15 +00:00
Whitelist users who can create repos
This commit is contained in:
parent
d9dc24d724
commit
ca193867e3
@ -180,6 +180,12 @@
|
|||||||
(dissoc :email)
|
(dissoc :email)
|
||||||
(assoc :status-team-member? status-member?))}))
|
(assoc :status-team-member? status-member?))}))
|
||||||
|
|
||||||
|
;; NOTE: This assumes username can be trusted and not tampered with
|
||||||
|
(def user-whitelisted?
|
||||||
|
#{"oskarth"
|
||||||
|
"annadanchenko"
|
||||||
|
"tpatja"})
|
||||||
|
|
||||||
(defapi service-routes
|
(defapi service-routes
|
||||||
(when (:dev env)
|
(when (:dev env)
|
||||||
{:swagger {:ui "/swagger-ui"
|
{:swagger {:ui "/swagger-ui"
|
||||||
@ -256,4 +262,4 @@
|
|||||||
;; NOTE: Don't allow anyone to create repos; manual add
|
;; NOTE: Don't allow anyone to create repos; manual add
|
||||||
:auth-rules authenticated?
|
:auth-rules authenticated?
|
||||||
:current-user user
|
:current-user user
|
||||||
(handle-toggle-repo user params false)))))
|
(handle-toggle-repo user params user-whitelisted?)))))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user