#1146 finsih UI work for access mode of collaborators

Collaborators have write access as default, and can be changed via repository
collaboration settings page to change between read, write and admin.
This commit is contained in:
Unknwon committed 2016-03-05 18:08:42 -05:00
1 parent 05d8664f15
commit 045f14fbd0
16 files changed
+292 -164

No files matched your search

+7 -3
View File
@@ -5,6 +5,8 @@
package admin
import (
"fmt"
"github.com/Unknwon/com"
"github.com/go-xorm/core"
@@ -218,11 +220,13 @@ func DeleteAuthSource(ctx *middleware.Context) {
if err = models.DeleteSource(source); err != nil {
switch err {
case models.ErrAuthenticationUserUsed:
ctx.Flash.Error("form.still_own_user")
ctx.Redirect(setting.AppSubUrl + "/admin/auths/" + ctx.Params(":authid"))
ctx.Flash.Error(ctx.Tr("admin.auths.still_in_used"))
default:
ctx.Handle(500, "DeleteSource", err)
ctx.Flash.Error(fmt.Sprintf("DeleteSource: %v", err))
}
ctx.JSON(200, map[string]interface{}{
"redirect": setting.AppSubUrl + "/admin/auths/" + ctx.Params(":authid"),
})
return
}
log.Trace("Authentication deleted by admin(%s): %d", ctx.User.Name, source.ID)