Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
I have a Public Stream with some Apps ..
These Apps have different "owner user".
I would like that logged users seens only its apps.
How can i write it on Security Rules?
hi @Riccardo
Following security rule hide all app in stream name "public" except the app which user owns.
Step -1
--------
Disable the default Stream rule.
Step-2
---------
Create two security rules.
Rule-1
Name : Custom-stream-rule
Description : Replacement for Default Stream rule and it hide app where stream name is equal to public.
resource filter : App*
Actions : Read
Conditions :
(resource.resourcetype = "App" and resource.stream.HasPrivilege("read"))
and !(resource.stream.name="public")
or
((resource.resourcetype = "App.Object" and resource.published ="true" and resource.objectType != "app_appscript" and resource.objectType != "loadmodel") and resource.app.stream.HasPrivilege("read"))
Context : Only in hub
Rule-2
Name : Custom-stream-exception-rule
Description : allows to show app when user is app owner
Resource filter : App*
Actions : Read
Conditions :
(resource.resourcetype = "App"
and resource.stream.HasPrivilege("read"))
and (resource.stream.name="public")
and ((user.name=resource.app.owner.name))
or
((resource.resourcetype = "App.Object"
and resource.published ="true"
and resource.objectType != "app_appscript"
and resource.objectType != "loadmodel")
and resource.app.stream.HasPrivilege("read"))
Context : Only in hub
Note: Resource filter : App* not App_*
i hope this rule is satisfy your requirement.
Thanks,
Sasikumar
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question. |