Open ErezWeiss opened 1 week ago
This is my suggestion for SelfServeApproval.mjs, line 258
// Notify all approvers about the self-approval
const approverGroup = await profileManager.lookUpGroupUsersByName(this.approverGroup)
for (const approver of approverGroup.users) {
const approverSlackInfo = await client.users.lookupByEmail({email: approver.email})
let messageString = `<@${slackUserId}> has self-approved access through profile _'${this.profileName}'_.\nGroup: ${selectedGroup}\nDuration: ${selectedTime}\nReason For Request: ${reasonForRequest}\n\`Self-Approved\``
msgOption = {
channel: approverSlackInfo.user.id,
text: messageString,
blocks: [
{
type: 'section',
text: {
type: 'mrkdwn',
text: messageString
}
}
]
}
await client.chat.postMessage(msgOption)
}
HI! We use the Slack bot app's Messages page as a live audit page - to know who requests what and when. As an admin, I can see all the requests and who approved them. We expect to see a message when people in the approvers' group get their approval (=self approval). Nowadays they get a private message from the app that says:
We want it to be visible to the rest of the admins, means all the approvers will get a message about this self-approval. Thanks! Erez