Batch of mirror fixes

This commit is contained in:
Unknown 2014-05-06 13:47:47 -04:00
parent e573855a4f
commit 7cb5a15c9b
12 changed files with 120 additions and 20 deletions

View file

@ -30,14 +30,15 @@ const (
OP_PULL_REQUEST
OP_TRANSFER_REPO
OP_PUSH_TAG
OP_COMMENT_ISSUE
)
// Action represents user operation type and other information to repository.,
// it implemented interface base.Actioner so that can be used in template render.
type Action struct {
Id int64
UserId int64 // Receiver user id.
OpType int // Operations: CREATE DELETE STAR ...
UserId int64 // Receiver user id.
OpType int
ActUserId int64 // Action user id.
ActUserName string // Action user name.
ActEmail string

View file

@ -80,3 +80,9 @@ func DeleteOauth2ById(id int64) error {
_, err := orm.Delete(&Oauth2{Id: id})
return err
}
// CleanUnbindOauth deletes all unbind OAuthes.
func CleanUnbindOauth() error {
_, err := orm.Delete(&Oauth2{Uid: -1})
return err
}