3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 18:25:03 +00:00

dashboard: use webpack for builds; use tailwindcss instead of bulma; all sorts of tweaks

This commit is contained in:
Dragory 2019-10-10 21:58:00 +03:00
parent 028786d348
commit 577500af92
42 changed files with 4813 additions and 3174 deletions

View file

@ -1,23 +1,23 @@
<template>
<div>
<h1 class="z-title is-1 mb-1">Permissions</h1>
<p class="mb-1">
<h1>Permissions</h1>
<p>
Permissions in Zeppelin are simply values in plugin configuration that are checked when the command is used.
These values can be changed with overrides (see <router-link to="/docs/plugin-configuration">Plugin configuration</router-link> for more info)
and can depend on e.g. user id, role id, channel id, category id, or <strong>permission level</strong>.
</p>
<h2 class="z-title is-2 mt-2 mb-1">Permission levels</h2>
<p class="mb-1">
<h2>Permission levels</h2>
<p>
The simplest way to control access to bot commands and features is via permission levels.
These levels are simply a number (usually between 0 and 100), based on the user's roles or user id, that can then
be used in permission overrides. By default, several commands are "moderator only" (level 50 and up) or "admin only" (level 100 and up).
</p>
<p class="mb-1">
<p>
Additionally, having a higher permission level means that certain commands (such as !ban) can't be used against
you by users with a lower or equal permission level (so e.g. moderators can't ban each other or admins above them).
</p>
<p class="mb-1">
<p>
Permission levels are defined in the config in the <strong>levels</strong> section. For example:
</p>
@ -28,14 +28,14 @@
"172950000412655616": 50 # Example mod
</CodeBlock>
<h2 class="z-title is-2 mt-2 mb-1">Examples</h2>
<h2>Examples</h2>
<h3 class="z-title is-3 mb-1">Basic overrides</h3>
<p class="mb-1">
<h3>Basic overrides</h3>
<p>
For this example, let's assume we have a plugin called <code>cats</code> which has a command <code>!cat</code> locked behind the permission <code>can_cat</code>.
Let's say that by default, the plugin allows anyone to use <code>!cat</code>, but we want to restrict it to moderators only.
</p>
<p class="mb-1">
<p>
Here's what the configuration for this would look like:
</p>
@ -51,7 +51,7 @@
can_cat: true
</CodeBlock>
<h3 class="z-title is-3 mt-2 mb-1">Replacing defaults</h3>
<h3>Replacing defaults</h3>
<p class="mb-1">
In this example, let's assume you don't want to use the default permission levels of 50 and 100 for mods and admins respectively.
Let's say you're using various incremental levels instead: 10, 20, 30, 40, 50...<br>