Decide who should be invited to new activities
Defining user roles is a central part of configuring an app. Almost every app define these two roles:
- owner: The individual who is responsible for the activity.
- members: List of participants to be invited to activities.
There are a few specialized roles for more advanced apps:
- review: Lets you add a review step for incoming activities, see review.
- admins: Administrators of an app, useful when creating private channels.
- superusers: Used in approval apps to limit access to certain attributes.
- private: Controls access to the app’s source code.
In addition, there is one important role that’s always present in activities:
- initiator: The individual who created the activity.
The initiator is a dynamic role and cannot be set in the code. You can access the initiator by using a macro. More about this below.
Default installer settings
When installing an app, Conclude will by default set the owner and members to:
- owner: The person who installed the app
- members: The channel where the app is installed
owner: "@julie",
members: "#decisions",
You can change this by editing the app after it has been installed.
Owner setting
The owner is the person who is responsible for an activity. An activity will be unassigned if the app doesn’t define an owner. You can control owner assignment through the ownerLabel and unassignedLabel roles.
An activity cannot have more than one owner; the owner must be a single individual.
Member setting
For the member setting, you can specify any number of individual users, channels or user groups. If you specify a channel or a user group, your app will invite all their current members when creating a new activity.
members: "#incidents, @escalation-team, @sarah"
Here we invite everyone from the #incidents channel, everyone in the @escalation-team user group, and @sarah to participate.
If you leave out the members setting then nobody will be invited to participate, except the owner, and you will need to manually invite people to join the channel.
Admins
The admins setting is useful in Slack workspaces where regular users don’t have permission to create new channels. Conclude will then rely on the admins permissions to create an activity channel.
admins: "@slack-admins, @jim"
The admins setting is similar to members, where you can specify any number of individual users, channels and user groups. Admins are not invited to participate in activity, however.
Superusers
A superuser is someone who is allowed to perform certain restricted actions, such as modifying the value of an attribute. The most common use case is for approvals, where only a superuser may approve a request. Like members and admins, superusers can be any number of users, channels and user groups.
Setting the superusers does not change the behavior of the app. It is a way to define people with special permissions. The superusers setting would then be referred to from elsewhere in the app.
Here we set @julie and @paul to be the superusers:
superusers: "@julie, @paul"
In the attribute section we specify that only superusers may change an attribute by defining the list of editors.
attributes:
- name: decision
editors: "${superusers}"
type: select
label: Decision
The ${superusers} macro will expand to “@julie, @paul”. You may of course hard-code the superusers into the editors setting, but this creates apps that are harder to read and more difficult to maintain.
Private
The private setting restricts who can access the source code of the app. By default, any channel member can view and modify the source code of apps installed in their channels.
For example, members of the #approvals channel will have full access to the source code of an app installed in this channel. Using the example above, you can limit code access by adding a private setting:
private: "@julie, @paul"
Please note that the private setting must refer to individual users, and cannot contain Slack channels or user groups. To improve readability of an app, refer to the superusers setting.
superusers: "@julie, @paul",
private: "${superusers}",
When editing the private setting in the source code, the editor will automatically make sure you are included, otherwise you would accidentally lose access to the source code you’re editing.
Initiator
The initiator is a dynamic activity setting, and you can refer to it in the code by using a macro.
For example, if you want to invite the individual who submitted a bug report to the specific activity, you can do this:
members: "#bugs, ${initiator}"
This will automatically invite them to the activity channel, along with the members of the #bugs channel.