This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Report on PersonWantsOrg: user see all requests

Hi,

 

I'm trying to implement a report fot the productOwner that show only the requests an owner can see.

A product owner can be owner of more than a product so in object browser an user that is owner of 2 products will see only request for those products but in a report he can see all the requests.

I thought the permission on what an user can see will be applied to the report too.

Any advice?

 

(7.1)

Parents
  • Let's assume you stick with a query. 

    I took the following where clauses from the role based permission groups. They should limit the results accordingly if you use the parameter @ReportScheduledBy I have described earlier. The parameter needs to contain the UID of a person.

    Select * from PersonWantsOrg 
    where
    
    -- My own requests
    -- Config Parm QER\ITShop\ShowClosedAssignmentOrders influences the result of the function QER_FTPWOVisibleForPerson
    UID_Personwantsorg in (select UID_Personwantsorg from dbo.QER_FTPWOVisibleForPerson(@ReportRequestedBy, 0))
    -- Requests i am able to see because I am a manager
    or
    UID_Personwantsorg in (select UID_Personwantsorg from dbo.QER_FTPWOVisibleForPerson(@ReportRequestedBy, 1))
    -- Requests i am able to see as Product Owner
    OR
    UID_Org in
    (select UID_ITShopOrg from ITShopOrg ito 
    				    join AccProduct ac
    					   on ito.UID_AccProduct = ac.UID_AccProduct
    				    join AERole ae
    					   on ac.UID_OrgRuler = ae.UID_AERole
    				    join PersonInAERole pia
    					   on ae.UID_AERole = pia.UID_AERole
    				    where pia.UID_Person = @ReportRequestedBy
    )
    

Reply
  • Let's assume you stick with a query. 

    I took the following where clauses from the role based permission groups. They should limit the results accordingly if you use the parameter @ReportScheduledBy I have described earlier. The parameter needs to contain the UID of a person.

    Select * from PersonWantsOrg 
    where
    
    -- My own requests
    -- Config Parm QER\ITShop\ShowClosedAssignmentOrders influences the result of the function QER_FTPWOVisibleForPerson
    UID_Personwantsorg in (select UID_Personwantsorg from dbo.QER_FTPWOVisibleForPerson(@ReportRequestedBy, 0))
    -- Requests i am able to see because I am a manager
    or
    UID_Personwantsorg in (select UID_Personwantsorg from dbo.QER_FTPWOVisibleForPerson(@ReportRequestedBy, 1))
    -- Requests i am able to see as Product Owner
    OR
    UID_Org in
    (select UID_ITShopOrg from ITShopOrg ito 
    				    join AccProduct ac
    					   on ito.UID_AccProduct = ac.UID_AccProduct
    				    join AERole ae
    					   on ac.UID_OrgRuler = ae.UID_AERole
    				    join PersonInAERole pia
    					   on ae.UID_AERole = pia.UID_AERole
    				    where pia.UID_Person = @ReportRequestedBy
    )
    

Children
No Data