index
:
gogs.git
Gogs is a painless self-hosted Git service
log msg
author
committer
range
buildscript
main
mygogs
about
summary
refs
log
tree
commit
diff
path:
root
/
internal
/
db
/
perms.go
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
Diffstat
(limited to 'internal/db/perms.go')
-rw-r--r--
internal/db/perms.go
6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/db/perms.go b/internal/db/perms.go
index a72a013a..b0a1a85a 100644
--- a/
internal/db/perms.go
+++ b/
internal/db/perms.go
@@ -82,6 +82,12 @@ type perms struct {
*gorm.DB
}
+// NewPermsStore returns a persistent interface for permissions with given
+// database connection.
+func NewPermsStore(db *gorm.DB) PermsStore {
+ return &perms{DB: db}
+}
+
type AccessModeOptions struct {
OwnerID int64 // The ID of the repository owner.
Private bool // Whether the repository is private.