   Validators = require './group/validators'
 
   @share()
+
+  allPerms = @getAllPermissions()
 
   @set
     softDelete          : yes

    slug = client.context.group ? 'koding'
    JGroup.one {slug}, (err, group)=>
      return callback err  if err
      group.fetchPermissionSet (err, permissionSet)=>
        return callback err  if err
        cb = (err, roles)=>
          return callback err  if err

          perms = (perm.permissions.slice()\
                  for perm in permissionSet.permissions\
                    # if user is an admin, add all
                    # roles into permission set
                  when perm.role in roles or 'admin' in roles)

          {flatten} = require 'underscore'
          callback null, flatten(perms), roles

        if this instanceof JAccount
          group.fetchMyRoles client, cb
        else
          cb null, ['guest']

  oldAddTags = @::addTags
  addTags: secure (client, tags, options, callback)->

  @trait __dirname, '../traits/taggable'
  @trait __dirname, '../traits/notifying'
  @trait __dirname, '../traits/flaggable'
  @trait __dirname, '../traits/protected'

  JStorage         = require './storage'
  JAppStorage      = require './appstorage'
