Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dispherical/identicate

ACL for Slack Bots
https://github.com/dispherical/identicate

Last synced: about 2 months ago
JSON representation

ACL for Slack Bots

Awesome Lists containing this project

README

        

# Identicate
`is_admin` and hard coding users for every bot are so outdated. One centralised place is awesome!

## Clients
There is currently a Node.js/Browser JavaScript one and a Python one. See CLIENTS.md for more infomation. They're basically wrappers around the language's request feature.

## API docs

GET `/acl/user/allowed`

Query params:

- user: Slack User ID, starts with a "U"
- permission: Service followed by a permission, i.e. `threadlocker:unlock`, or `orpheaux:play`

Sample response:

```
{
"isAllowed": Boolean,
"comments": String | null,
"error": Boolean
}
```

GET `/acl/user/lookup`

Query params:

- user: Slack User ID, starts with a "U"

Sample response:

```
{
"name": String | null,
"comments": String | null,
"id": String | null,
"comments": String | null,
"error": Boolean | null,
"roles": [
{
"name": String | null,
"id": String | null,
"permissions": Array[String] | null
}
]
}
```

GET `/acl/role/lookup`

Query params:

- role: Role ID, found in `config.js`

Sample response:

```
{
"name": String | null,
"comments": String | null,
"id": String | null,
"error": Boolean | null,
"managers": Array[String],
"members": Array[String],
"roles": [
{
"name": String | null,
"id": String | null,
"permissions": Array[String] | null
}
]
}
```

GET `/acl/service/lookup`

Query params:

- service: Serice ID, found in `config.js`

Sample response:

```
{
"name": String | null,
"id": String | null,
"permissions": Array[String],
"error": Boolean | null
}
```