 CacheManager           = require('./cache_manager')
 SystemPermissions      = require('./system_permissions')
 
-class UserPermissionManager extends CacheManager
+# the permission might be changed by other workers.
+# caching is disabled
+class UserPermissionManager
     collectionName = "Permissions"
 
     constructor : (@mongoInterface, callback) ->
-        super(SystemPermissions)
         @dbOperation('addIndex', null, {_email:1}, 
             (err) =>
                 callback(err,this)

                if sysPermRec
                    @dbOperation 'removeUser', user, null, (err) ->
                        # Remove from cache
                        next(err, @remove(user))
                else next(null, null)
        ], callback


                if not sysPermRec
                    @dbOperation 'addUser', user, null, (err) =>
                        # Add to cache
                        next(err, new SystemPermissions(user))
                else next(null, sysPermRec)
            (sysPermRec, next) =>
                @setSysPerm
