Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
fabricecallegar
Partner - Creator
Partner - Creator

security rule to publish an application according Custom Property

Hello,

"@Customer" custom property is available for apps, stream and users.

An app and a stream are assigned to 1 value of @Customer.

A user can be assigned to many values of @Customer.

 

I'm trying to create a rule that allow users to publish an application according this custom property. Something like that (security rule to publish, stream resource):

((user.@CUSTOMER = resource.stream.@CUSTOMER

and

user.@CUSTOMER = resource.app.@CUSTOMER))

but it does not work (no stream availbale when I try to publish).

 

Can somebody help me to create this rule?

 

regards

Fabrice

Labels (5)
12 Replies
rubenmarin

Hi Fabrice, you don't need to access the stream from the resource, the resource is already the stream, so maybe is just:

((user.@CUSTOMER = resource.@CUSTOMER))

But I'm not sure how to check both properties in one shot (stream and app properties) maybe swiching the resource to both: app and stream?

BTW, I think you can't access app from stream, the opposite works (app.stream) because an app is in only one stream but I have doubts about the stream.app (or resource.app when the resource is a stream).

Regards

fabricecallegar
Partner - Creator
Partner - Creator
Author

Hello,

I tried ((user.@CUSTOMER = resource.@CUSTOMER)) with resources app and stream but it doesn't work.

The @CUSTOMER from the app is not take in account.

 

 

fabricecallegar
Partner - Creator
Partner - Creator
Author

no one has another idea?

fabricecallegar
Partner - Creator
Partner - Creator
Author

no one to help me?

 

I just want to limit the publication of an application, in a stream with the custom property @CUSTOMER is the same for both application/stream?

At worst how can I publish an app in a stream (security rule to this stream) only for the application which have the custom property @CUSTOMER = "TOTO"

 

thank in advance,

fabricecallegar
Partner - Creator
Partner - Creator
Author

 I note that in the security rules, a comparison with custom properties is always with user.@CustomProperty. 

I mean it always reference the "user" resource. Is that correct?

 

rubenmarin

Hi, it's not a "must" but is the usual way to do it because usually you want to compare properties asssigned to the user to the ones assigned to other entities (stream, app, app_object, data connection...)

fabricecallegar
Partner - Creator
Partner - Creator
Author

Ok,

so if I don't want to compare custom properties from the user but between an app and a stream.

How can I do that?

rubenmarin

app.@CustomProperty=app.stream.@CustomProperty

fabricecallegar
Partner - Creator
Partner - Creator
Author

Thank you for your answer.

 

To come back to my original question, I tried the security rule:

  • Resource filter: App_*,Stream_*
  • action: "publish"
  • conditions: ((app.@SECURITY=app.stream.@SECURITY))

The rule is "validated" but does not work as expected (in the hub, when trying to publish, nothing is proposed in the stream list...)