public static function add($request, $match)
    {
        $perm = Pluf_Shortcuts_GetObjectOr404('User_Role', $match['role_id']);
        if (array_key_exists('user_id', $match)) {
            $user = Pluf_Shortcuts_GetObjectOr404('User_Account', $match['user_id']);
        } elseif (array_key_exists('user_id', $request->REQUEST)) {
            $user = Pluf_Shortcuts_GetObjectOr404('User_Account', $request->REQUEST['user_id']);
        } elseif (array_key_exists('login', $request->REQUEST)) {
            $user = new User_Account();
            $user = $user->getUser($request->REQUEST['login']);
        }
        if (! isset($user) || $user->isAnonymous()) {
            throw new Pluf_HTTP_Error404(__('User not found'));
        }
        $perm->setAssoc($user);
        return $user;
    }