29 lines
756 B
Diff
29 lines
756 B
Diff
From 8a08a7a35c743fabee395d9a9b50df596095804f Mon Sep 17 00:00:00 2001
|
|
From: nyyu <mail@nyyu.dev>
|
|
Date: Mon, 26 Dec 2022 19:21:15 +0100
|
|
Subject: [PATCH] Add global user secret
|
|
|
|
---
|
|
server/api/org.go | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/server/api/org.go b/server/api/org.go
|
|
index e79a3ae3..5f45c060 100644
|
|
--- a/server/api/org.go
|
|
+++ b/server/api/org.go
|
|
@@ -37,6 +37,11 @@ func GetOrgPermissions(c *gin.Context) {
|
|
return
|
|
}
|
|
|
|
+ if user.Login == owner {
|
|
+ c.JSON(http.StatusOK, &model.OrgPerm{Member: true, Admin: true})
|
|
+ return
|
|
+ }
|
|
+
|
|
perm, err := server.Config.Services.Membership.Get(c, user, owner)
|
|
if err != nil {
|
|
c.String(http.StatusInternalServerError, "Error getting membership for %q. %s", owner, err)
|
|
--
|
|
2.39.0
|
|
|