Task Attachments #104

Merged
konrad merged 63 commits from feature/attachments into master 2019-10-16 20:52:31 +00:00
1 changed files with 6 additions and 4 deletions
Showing only changes of commit c6152d63f2 - Show all commits

View File

@ -19,13 +19,15 @@ package models
import "code.vikunja.io/web"
// CanRead checks if the user can see an attachment
func (ta *TaskAttachment) CanRead(web.Auth) (bool, error) {
panic("implement me")
func (ta *TaskAttachment) CanRead(a web.Auth) (bool, error) {
t := Task{ID: ta.TaskID}
return t.CanRead(a)
}
// CanDelete checks if the user can delete an attachment
func (ta *TaskAttachment) CanDelete(web.Auth) (bool, error) {
panic("implement me")
func (ta *TaskAttachment) CanDelete(a web.Auth) (bool, error) {
t := Task{ID: ta.TaskID}
return t.CanWrite(a)
}
// CanCreate checks if the user can create an attachment