Clarity

  • 1.  Instance right query

    Posted Dec 17, 2014 08:50 AM

    Hello All,

     

    I am trying to find all the instances for a resource "Resource - Approve Time" instance right. Below is the query which I have prepared:

     

    select

    PER.PRINCIPAL_ID,

    CMN.LAST_NAME||', '||CMN.FIRST_NAME User_name,

    PER.RIGHT_ID,

    SRM.FULL_NAME,

    PER.OBJECT_INSTANCE_ID

     

    from cmn_sec_assgnd_obj_perm per,

            cmn_sec_users cmn,

            srm_resources srm

     

    where per.principal_id=cmn.id

         and per.object_instance_id=srm.id

         and per.principal_type='USER'

         and per.principal_id =5035671

         and per.right_id=3632

         and SRM.IS_ACTIVE=1

         and per.permission_id=50

     

    I checked the result against few resources and it is giving correct result. But, I want to be very sure before including this in a report.

     

    Please, check and let me know if above query is correct or not.

     

    Thanks,

    Pragya Singh



  • 2.  Re: Instance right query

    Posted Dec 17, 2014 09:14 AM

    Your query probably finds all the instance rights OK, but the Clarity security model is much more complicated than that - the "Resource - Approve Time" access right can be granted at several other levels (other than 'instance') and your query does not pick that up.  (i.e. If you do genuinely only care about instance rights you are probably OK, if you actually care about the access-right itself, then your problem is a lot more complicated)

     

    There are a few threads on the forums about access-rights so the full-answer is on here somewhere (the full query is a combination of several queries to cover all the different ways that access-rights can be granted)

     

    here is one earlier thread ; Re: Clarity rights Query



  • 3.  Re: Instance right query

    Posted Dec 17, 2014 09:21 AM

    I concur with Dave on this. Getting ALL the rights would probably be more important to you than simply Instance Rights as it appears you want to build a report from this query.



  • 4.  Re: Instance right query

    Posted Dec 17, 2014 09:39 AM

    Hello Dave,

     

    You are right.

    I should also check "Timesheet approve" rights through other levels too. Only instance right will not the serve the purpose.

     

    I will go through the thread indicated by you and will try to prepare a query which finds out this right at all level for a resource.

     

    Thanks,

    Pragya Singh