proper permission checking
This commit is contained in:
parent
5ab238cc1c
commit
7b5646d007
@ -8,7 +8,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/rxdn/gdl/objects/guild"
|
||||
)
|
||||
|
||||
0
|
||||
func IndexHandler(ctx *gin.Context) {
|
||||
store := sessions.Default(ctx)
|
||||
if store == nil {
|
||||
|
@ -6,6 +6,7 @@ import (
|
||||
"github.com/TicketsBot/GoPanel/rpc/cache"
|
||||
"github.com/TicketsBot/GoPanel/rpc/ratelimit"
|
||||
"github.com/rxdn/gdl/objects/guild"
|
||||
"github.com/rxdn/gdl/permission"
|
||||
"github.com/rxdn/gdl/rest"
|
||||
"strconv"
|
||||
)
|
||||
@ -23,7 +24,7 @@ func IsAdmin(g guild.Guild, userId uint64, res chan bool) {
|
||||
res <- true
|
||||
}
|
||||
|
||||
if g.Permissions & 0x8 != 0 {
|
||||
if permission.HasPermissionRaw(g.Permissions, permission.Administrator) {
|
||||
res <- true
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user