Skip to content

Commit

Permalink
chore(api-gql): debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Satont committed May 23, 2024
1 parent a1dc1ad commit f1c7430
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func (c *Directives) HasChannelRolesDashboardPermission(
}

if user.ID == dashboardId || user.IsBotAdmin {
fmt.Println(user.ID, dashboardId)
return next(ctx)
}

Expand All @@ -40,10 +41,12 @@ func (c *Directives) HasChannelRolesDashboardPermission(
for _, role := range userRoles {
for _, perm := range role.Role.Permissions {
if perm == gqlmodel.ChannelRolePermissionEnumCanAccessDashboard.String() {
fmt.Println(user.ID, "1")
return next(ctx)
}

if permission.String() == perm {
fmt.Println(user.ID, "2")
return next(ctx)
}
}
Expand Down

0 comments on commit f1c7430

Please sign in to comment.