Rev 64 | Blame | Compare with Previous | Last modification | View Log | RSS feed
/* Access Control Static Permissions */SELECT co.obj_name, perm.perm_id, perm.perm_valueFROM ((/* All 'Y' User Permissions *//* Get all 'Y' permissions */SELECT DISTINCT rp.OBJ_ID, rp.PERM_ID, rp.PERM_VALUEFROM USER_ROLES ur,ROLE_PRIVILEGES rp,ROLES roWHERE ur.ROLE_ID = ro.ROLE_IDAND rp.ROLE_ID = ro.ROLE_IDAND ur.USER_ID = :USER_IDAND rp.PERM_VALUE = 'Y'AND ro.APP_ID = :APP_IDMINUS/* Revoke permissions if they set to 'N'*/SELECT DISTINCT rp.OBJ_ID, rp.PERM_ID, 'Y' AS PERM_VALUEFROM USER_ROLES ur,ROLE_PRIVILEGES rp,ROLES roWHERE ur.ROLE_ID = ro.ROLE_IDAND rp.ROLE_ID = ro.ROLE_IDAND ur.USER_ID = :USER_IDAND rp.PERM_VALUE = 'N'AND ro.APP_ID = :APP_ID)MINUS/* Role Variant Revokes */SELECT DISTINCT rp.OBJ_ID, rp.perm_id, 'Y' AS perm_valueFROM role_privileges rp,ROLES ro,user_roles urWHERE ro.role_id = rp.role_idAND ro.role_id = ur.role_idAND rp.PERM_VALUE = 'N'AND ro.IS_ROLE_VARIATION = 'Y'AND ur.user_id = :USER_IDAND ro.APP_ID = :APP_ID) perm,control_objects co--page_control_objects pco,--application_pages apWHERE perm.obj_id = co.obj_idAND co.APP_ID = :APP_ID-- AND ap.APP_ID = co.APP_ID-- AND ap.APP_ID = :APP_ID--AND pco.obj_id = co.obj_id--AND pco.PAGE_ID = ap.PAGE_ID--AND ap.page_name = :PAGE_NAME/* Return uncomented lines to include use of APPLICATION_PAGES table */