Appian Community and Appian Academy are being upgraded. As a part of the upgrade, Appian Community is currently in read-only mode, and user registration is disabled until August 3. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

Security and multiple sites in Appian

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

Parents
  • I have a series of steps to gracefully achieve it. 

    1. Create a common application and the all users group of that app should have the all users group of all the other apps. 
    2. Create a site in that app and use the code below to create the interface to navigate to different sites. 
      a!localVariables(
        local!columnsInARow: 4,
        local!configurations: {
          {
            icon: "cubes",
            title: "Manage Stock",
            description: "Manage your inventory in the system",
            showWhen: true,
            url: null
          },
          {
            icon: "dollar",
            title: "Manage Price",
            description: "Manage pricing of items you offer",
            showWhen: true,
            url: null
          },
          {
            icon: "users",
            title: "Manage Users",
            description: "Manage users within your organization",
            showWhen: true,
            url: null
          },
          {
            icon: "ad",
            title: "Manage Ads",
            description: "Manage advertisments across platforms",
            showWhen: true,
            url: null
          },
          {
            icon: "cogs",
            title: "More settings",
            description: "Access more settings of the system",
            showWhen: true,
            url: null
          }
        },
        local!visibleConfigurations: reject(
          a!isNullOrEmpty(_),
          a!forEach(
            items: local!configurations,
            expression: if(or(fv!item.showWhen), fv!item, null)
          )
        ),
        local!numberOfRows: ceiling(
          count(local!visibleConfigurations) / local!columnsInARow
        ),
        {
          a!forEach(
            items: enumerate(local!numberOfRows),
            expression: a!columnsLayout(
              columns: {
                a!forEach(
                  items: index(
                    local!visibleConfigurations,
                    enumerate(local!columnsInARow) + 1 + (fv!item * local!columnsInARow),
                    null
                  ),
                  expression: a!columnLayout(
                    contents: a!cardLayout(
                      contents: {
                        a!richTextDisplayField(
                          labelPosition: "COLLAPSED",
                          value: {
                            a!richTextIcon(
                              icon: fv!item.icon,
                              color: "ACCENT",
                              size: "LARGE"
                            ),
                            char(10),
                            a!richTextItem(text: fv!item.title, size: "MEDIUM"),
                            char(10),
                            a!richTextItem(
                              text: fv!item.description,
                              color: "SECONDARY",
                              size: "SMALL"
                            )
                          },
                          align: "CENTER"
                        )
                      },
                      link: a!safeLink(uri: fv!item.url),
                      /* • Replace dynamic link with any other link type*/
                      height: "SHORT",
                      showWhen: not(a!isNullOrEmpty(fv!item))
                    ),
                    
                  )
                )
              }
            )
          )
        }
      )
    3. Now in front of showWhen you can use the function Chris proposed to check the security and the code will auto handle the visibility. 

    There is just one overhead with this approach. You will need to update this interface everytime you add/remove a site in the system

Reply
  • I have a series of steps to gracefully achieve it. 

    1. Create a common application and the all users group of that app should have the all users group of all the other apps. 
    2. Create a site in that app and use the code below to create the interface to navigate to different sites. 
      a!localVariables(
        local!columnsInARow: 4,
        local!configurations: {
          {
            icon: "cubes",
            title: "Manage Stock",
            description: "Manage your inventory in the system",
            showWhen: true,
            url: null
          },
          {
            icon: "dollar",
            title: "Manage Price",
            description: "Manage pricing of items you offer",
            showWhen: true,
            url: null
          },
          {
            icon: "users",
            title: "Manage Users",
            description: "Manage users within your organization",
            showWhen: true,
            url: null
          },
          {
            icon: "ad",
            title: "Manage Ads",
            description: "Manage advertisments across platforms",
            showWhen: true,
            url: null
          },
          {
            icon: "cogs",
            title: "More settings",
            description: "Access more settings of the system",
            showWhen: true,
            url: null
          }
        },
        local!visibleConfigurations: reject(
          a!isNullOrEmpty(_),
          a!forEach(
            items: local!configurations,
            expression: if(or(fv!item.showWhen), fv!item, null)
          )
        ),
        local!numberOfRows: ceiling(
          count(local!visibleConfigurations) / local!columnsInARow
        ),
        {
          a!forEach(
            items: enumerate(local!numberOfRows),
            expression: a!columnsLayout(
              columns: {
                a!forEach(
                  items: index(
                    local!visibleConfigurations,
                    enumerate(local!columnsInARow) + 1 + (fv!item * local!columnsInARow),
                    null
                  ),
                  expression: a!columnLayout(
                    contents: a!cardLayout(
                      contents: {
                        a!richTextDisplayField(
                          labelPosition: "COLLAPSED",
                          value: {
                            a!richTextIcon(
                              icon: fv!item.icon,
                              color: "ACCENT",
                              size: "LARGE"
                            ),
                            char(10),
                            a!richTextItem(text: fv!item.title, size: "MEDIUM"),
                            char(10),
                            a!richTextItem(
                              text: fv!item.description,
                              color: "SECONDARY",
                              size: "SMALL"
                            )
                          },
                          align: "CENTER"
                        )
                      },
                      link: a!safeLink(uri: fv!item.url),
                      /* • Replace dynamic link with any other link type*/
                      height: "SHORT",
                      showWhen: not(a!isNullOrEmpty(fv!item))
                    ),
                    
                  )
                )
              }
            )
          )
        }
      )
    3. Now in front of showWhen you can use the function Chris proposed to check the security and the code will auto handle the visibility. 

    There is just one overhead with this approach. You will need to update this interface everytime you add/remove a site in the system

Children