![]() | Products |
| Home » Technical Support » ElevateDB Technical Support » Incident Reports » Incident Reports Addressed for Version 2.05 » View Incident Report |
| Reported By: Hendrik Grutzmacher Reported On: 4/15/2011 For: Version 2.05 Build 6 |
ALTER PROCEDURE P_USR_REVOKEROLEFROMUSER(IN P_USERID INTEGER, IN P_ROLEUSERID INTEGER)
BEGIN
DECLARE curRemainingRights CURSOR FOR stmtRemainingRights;
DECLARE cName VARCHAR;
DECLARE nRight BIGINT;
PREPARE stmtRemainingRights FROM
'select name, grantedright from t_userrights ur
where user__id in
(
select id from t_users
where not id in
(
select id from t_users,
(
select roleuser__id from t_userroles
where user__id = ? and
not roleuser__id = ? and
not roleuser__id is null
union all
select a2.roleuser__id from t_userroles a1, t_userroles a2
where a1.roleuser__id = a2.user__id and
a1.user__id = ? and
not a1.roleuser__id = ? and
not a2.roleuser__id is null
) a1
where id = a1.roleuser__id
)
and (f_usr_userhasrole(?, id) or id = ?)
)
and not grantedright in
(
select grantedright from t_userrights
where user__id in
(
select id from t_users,
(
select roleuser__id from t_userroles
where user__id = ? and
not roleuser__id = ? and
not roleuser__id is null
union all
select a2.roleuser__id from t_userroles a1, t_userroles a2
where a1.roleuser__id = a2.user__id and
a1.user__id = ? and
not a1.roleuser__id = ? and
not a2.roleuser__id is null
) a1
where id = a1.roleuser__id
)
)';
OPEN curRemainingRights USING P_USERID, P_ROLEUSERID, P_USERID, P_ROLEUSERID, P_ROLEUSERID, P_ROLEUSERID, P_USERID, P_ROLEUSERID, P_USERID, P_ROLEUSERID;
SET STATUS MESSAGE TO 'ab gehts';
FETCH FIRST FROM curRemainingRights INTO cName, nRight;
WHILE NOT EOF(curRemainingRights) DO
SET STATUS MESSAGE TO cName;
FETCH NEXT FROM curRemainingRights INTO cName, nRight;
END WHILE;
CLOSE curRemainingRights;
UNPREPARE stmtRemainingRights;
ENDThis web page was last updated on Wednesday, April 8, 2026 at 04:38 AM | Privacy Policy © 2026 Elevate Software, Inc. All Rights Reserved Questions or comments ? |

