Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
server
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
m-team
oidc
mytoken
server
Commits
999eb833
Commit
999eb833
authored
3 years ago
by
Gabriel Zachmann
Browse files
Options
Downloads
Patches
Plain Diff
fix get enabled grants bug if no grants yet enabled
parent
bb636cca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
internal/db/dbrepo/grantrepo/grants.go
+1
-0
1 addition, 0 deletions
internal/db/dbrepo/grantrepo/grants.go
with
1 addition
and
0 deletions
internal/db/dbrepo/grantrepo/grants.go
+
1
−
0
View file @
999eb833
...
...
@@ -70,6 +70,7 @@ func GrantEnabled(rlog log.Ext1FieldLogger, tx *sqlx.Tx, myID mtid.MTID, grantTy
return
errors
.
WithStack
(
tx
.
Get
(
&
enabled
,
`CALL Grants_CheckEnabled(?,?)`
,
myID
,
grantType
.
String
()))
},
);
err
!=
nil
{
_
,
err
=
db
.
ParseError
(
err
)
// if no rows found, that's not an error, but grant is not enabled
return
false
,
err
}
return
bool
(
enabled
),
nil
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment