summaryrefslogtreecommitdiffstats
path: root/models/access.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-01 11:32:12 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-01 11:32:12 -0400
commitf6c4fbeb37bc7fcbc947c162358c39e9bed90488 (patch)
tree37d9ba100ba006b9d322014bff1975014b8f3fd3 /models/access.go
parent0dfb5560cdee369b2292071d14d750b2477c6086 (diff)
downloadgitea-f6c4fbeb37bc7fcbc947c162358c39e9bed90488.tar.gz
gitea-f6c4fbeb37bc7fcbc947c162358c39e9bed90488.zip
Collaborator
Diffstat (limited to 'models/access.go')
-rw-r--r--models/access.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/models/access.go b/models/access.go
index 970f4a941f..749a2604d5 100644
--- a/models/access.go
+++ b/models/access.go
@@ -42,6 +42,12 @@ func UpdateAccess(access *Access) error {
return err
}
+// DeleteAccess deletes access record.
+func DeleteAccess(access *Access) error {
+ _, err := orm.Delete(access)
+ return err
+}
+
// UpdateAccess updates access information with session for rolling back.
func UpdateAccessWithSession(sess *xorm.Session, access *Access) error {
if _, err := sess.Id(access.Id).Update(access); err != nil {