Merge branch 'master' into sync_image

This commit is contained in:
Wenkai Yin 2016-06-01 15:10:52 +08:00
commit 610566fe73

View File

@ -56,7 +56,7 @@ func hasProjectAdminRole(userID int, projectID int64) bool {
//sysadmin has all privileges to all projects
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)
if err != nil {
return roles, err