gosora/forum_perms_store.go

20 lines
408 B
Go
Raw Normal View History

package main
var fpstore *ForumPermsStore
type ForumPermsStore struct {
}
func NewForumPermsStore() *ForumPermsStore {
return &ForumPermsStore{}
}
func (fps *ForumPermsStore) Get(fid int, gid int) (fperms ForumPerms, err error) {
// TODO: Add a hook here and have plugin_socialgroups use it
group, err := gstore.Get(gid)
if err != nil {
return fperms, ErrNoRows
}
return group.Forums[fid], nil
}