From 7dc8699cbddd2542c5a697f79bf04266302e223c Mon Sep 17 00:00:00 2001 From: konrad Date: Tue, 24 Jul 2018 17:47:08 +0200 Subject: [PATCH] updated todo + fmt --- Featurecreep.md | 8 ++++---- models/error.go | 6 +++--- models/team_list_rights.go | 2 +- models/team_namespace_create.go | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Featurecreep.md b/Featurecreep.md index bc7c8bb24..5f02e5670 100644 --- a/Featurecreep.md +++ b/Featurecreep.md @@ -136,10 +136,10 @@ Teams sind global, d.h. Ein Team kann mehrere Namespaces verwalten. * [x] Create * [x] ReadAll * [x] Delete -* [ ] `lists/:id/teams` - * [ ] Create - * [ ] ReadAll - * [ ] Delete +* [x] `lists/:id/teams` + * [x] Create + * [x] ReadAll + * [x] Delete #### v0.3 diff --git a/models/error.go b/models/error.go index 42cbc6bb1..8f38540f0 100644 --- a/models/error.go +++ b/models/error.go @@ -178,7 +178,7 @@ func (err ErrNeedToBeListWriter) Error() string { // ErrNeedToHaveListReadAccess represents an error, where the user dont has read access to that List type ErrNeedToHaveListReadAccess struct { ListID int64 - UserID int64 + UserID int64 } // IsErrNeedToHaveListReadAccess checks if an error is a ErrListDoesNotExist. @@ -438,7 +438,7 @@ func (err ErrInvalidTeamRight) Error() string { // ErrTeamAlreadyHasAccess represents an error where a team already has access to a list/namespace type ErrTeamAlreadyHasAccess struct { TeamID int64 - ID int64 + ID int64 } // IsErrTeamAlreadyHasAccess checks if an error is ErrTeamAlreadyHasAccess. @@ -449,4 +449,4 @@ func IsErrTeamAlreadyHasAccess(err error) bool { func (err ErrTeamAlreadyHasAccess) Error() string { return fmt.Sprintf("This team already has access. [Team ID: %d, ID: %d]", err.TeamID, err.ID) -} \ No newline at end of file +} diff --git a/models/team_list_rights.go b/models/team_list_rights.go index ba34afec0..c9b68ecc0 100644 --- a/models/team_list_rights.go +++ b/models/team_list_rights.go @@ -10,4 +10,4 @@ func (tl *TeamList) CanCreate(user *User) bool { func (tl *TeamList) CanDelete(user *User) bool { l, _ := GetListByID(tl.ListID) return l.IsAdmin(user) -} \ No newline at end of file +} diff --git a/models/team_namespace_create.go b/models/team_namespace_create.go index f8f307126..30c6b5cc4 100644 --- a/models/team_namespace_create.go +++ b/models/team_namespace_create.go @@ -19,7 +19,7 @@ func (tn *TeamNamespace) Create(doer *User) (err error) { if err != nil { return } - + // Check if the team already has access to the namespace exists, err := x.Where("team_id = ?", tn.TeamID). And("namespace_id = ?", tn.NamespaceID).