Finish new admin dashboard

This commit is contained in:
Unknwon
2014-08-28 22:29:00 +08:00
parent 81287ba022
commit 1aec1a2dda
19 changed files with 360 additions and 167 deletions

View File

@ -159,6 +159,12 @@ func CreateOrganization(org, owner *User) (*User, error) {
return org, sess.Commit()
}
// CountOrganizations returns number of organizations.
func CountOrganizations() int64 {
count, _ := x.Where("type=1").Count(new(User))
return count
}
// TODO: need some kind of mechanism to record failure.
// DeleteOrganization completely and permanently deletes everything of organization.
func DeleteOrganization(org *User) (err error) {