Hi,
I have two applications and the respective sites for those applications for now. In future these count of applications may grow.
Now, I got a requirement that I have to provide a common interface which user can use to navigate the respective site based on the application groups user belonging to.
Some users may have access to both sites and some users have access to a single site.
Can someone advise how and the best way to handle the situation.
Thanks in advance.
Discussion posts and replies are publicly visible
Assuming you simply need to hide/show components such as links on an interface, you can utilize a!isUserMemberOfGroup() to determine if the link should show based on group membership:
a!linkField( showWhen: a!isUserMemberOfGroup( username: loggedInUser(), group: cons!YOUR_ACCESS_GROUP_HERE, matchAllGroups: true ), links: {/* link here */} )
If that is not what you are looking for, please provide any additional details on your use case.
Do I need to create a separate site and which is common across all the applications and do this kind of implementation.
swapnar6405 said:Do I need to create a separate site
This would be the easiest approach for this by quite a bit - for instance I created a "default site" that's viewable to all users and loaded by default in case a user doens't have permission to one of the other sites they might have groupwise access to otherwise.
If I create a separate site(default site) then what about the users and groups.
Do I need to create groups and users in the default site otherwise, how can I verify groups/users which are part of other application(s).
Please advice.
Thanks.
Create a "default site" with its own viewership group. Add any other groups which should (ever) have viewership to that site, to this site's viewership group. That might even include "all users" group(s) in this case. Your other site(s) and their group(s) wouldn't necessarily be effected by this.
If you're after anything particularly more specific here, though, you'll need to specify what your special requirements are.
a!linkField( showWhen: a!isUserMemberOfGroup( username: loggedInUser(), group: cons!YOUR_ACCESS_GROUP_HERE, matchAllGroups: true ), links: {/* link here */})
We have different kind of links. Do I need to use any specific link types to navigate to Appian site?
Don't use a!linkField for anything (ever). Instead use a!richTextDisplayField(), and in its text item, use a!safeLink(). Your safeLink will need to (manually) call the URL of the Site in question. I don't currently know of any programmatic way to link to an alternate site rather than manually linking the site URL (though this can include assembling the URL using the site's stub and the current environment's URL).
Mike Schmitt said:Don't use a!linkField for anything (ever). Instead use a!richTextDisplayField(), and in its text item, use a!safeLink().
Despite my example containing a!linkField(), I agree with the a!richTextDisplayField() approach instead