Merge branch 'master' into new-ui-with-sync-image

This commit is contained in:
kunw 2016-06-01 14:03:52 +08:00
commit 3c530f63f0

View File

@ -48,7 +48,7 @@ func hasProjectAdminRole(userID int, projectID int64) bool {
//sysadmin has all privileges to all projects //sysadmin has all privileges to all projects
func listRoles(userID int, projectID int64) ([]models.Role, error) { func listRoles(userID int, projectID int64) ([]models.Role, error) {
roles := make([]models.Role, 1) roles := make([]models.Role, 0, 1)
isSysAdmin, err := dao.IsAdminRole(userID) isSysAdmin, err := dao.IsAdminRole(userID)
if err != nil { if err != nil {
return roles, err return roles, err