\n\n\n\n","import { render, staticRenderFns } from \"./CodeBlock.vue?vue&type=template&id=0513cc6f&\"\nimport script from \"./CodeBlock.vue?vue&type=script&lang=js&\"\nexport * from \"./CodeBlock.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',[_vm._v(\"Permissions\")]),_vm._v(\" \"),_c('p',[_vm._v(\"\\n Permissions in Zeppelin are simply values in plugin configuration that are checked when the command is used.\\n These values can be changed with overrides (see \"),_c('router-link',{attrs:{\"to\":\"/docs/configuration/plugin-configuration\"}},[_vm._v(\"Plugin configuration\")]),_vm._v(\" for more info)\\n and can depend on e.g. user id, role id, channel id, category id, or \"),_c('strong',[_vm._v(\"permission level\")]),_vm._v(\".\\n \")],1),_vm._v(\" \"),_c('h2',[_vm._v(\"Permission levels\")]),_vm._v(\" \"),_c('p',[_vm._v(\"\\n The simplest way to control access to bot commands and features is via permission levels.\\n These levels are simply a number (usually between 0 and 100), based on the user's roles or user id, that can then\\n be used in permission overrides. By default, several commands are \\\"moderator only\\\" (level 50 and up) or \\\"admin only\\\" (level 100 and up).\\n \")]),_vm._v(\" \"),_c('p',[_vm._v(\"\\n Additionally, having a higher permission level means that certain commands (such as !ban) can't be used against\\n you by users with a lower or equal permission level (so e.g. moderators can't ban each other or admins above them).\\n \")]),_vm._v(\" \"),_vm._m(0),_vm._v(\" \"),_c('CodeBlock',{attrs:{\"code-lang\":\"yaml\"}},[_vm._v(\"\\n # \\\"role/user id\\\": level\\n levels:\\n \\\"172949857164722176\\\": 100 # Example admin\\n \\\"172950000412655616\\\": 50 # Example mod\\n \")]),_vm._v(\" \"),_c('h2',[_vm._v(\"Examples\")]),_vm._v(\" \"),_c('h3',[_vm._v(\"Basic overrides\")]),_vm._v(\" \"),_vm._m(1),_vm._v(\" \"),_c('p',[_vm._v(\"\\n Here's what the configuration for this would look like:\\n \")]),_vm._v(\" \"),_c('CodeBlock',{attrs:{\"code-lang\":\"yaml\"}},[_vm._v(\"\\n plugins:\\n cats:\\n config:\\n can_cat: false # Here we set the permission false by default\\n overrides:\\n # In this override, can_cat is changed to \\\"true\\\" for anyone with a permission level of 50 or higher\\n - level: \\\">=50\\\"\\n config:\\n can_cat: true\\n \")]),_vm._v(\" \"),_c('h3',[_vm._v(\"Replacing defaults\")]),_vm._v(\" \"),_vm._m(2),_vm._v(\" \"),_c('p',{staticClass:\"mb-1\"},[_vm._v(\"\\n Here's what the configuration for this would look like:\\n \")]),_vm._v(\" \"),_c('CodeBlock',{attrs:{\"code-lang\":\"yaml\"}},[_vm._v(\"\\n plugins:\\n mod_actions:\\n replaceDefaultOverrides: true\\n overrides: # The \\\"=\\\" here means \\\"replace any defaults\\\"\\n - level: \\\">=70\\\"\\n config:\\n can_warn: true\\n can_mute: true\\n can_kick: true\\n - level: \\\">=90\\\"\\n config:\\n can_ban: true\\n \")])],1)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('p',[_vm._v(\"\\n Permission levels are defined in the config in the \"),_c('strong',[_vm._v(\"levels\")]),_vm._v(\" section. For example:\\n \")])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('p',[_vm._v(\"\\n For this example, let's assume we have a plugin called \"),_c('code',[_vm._v(\"cats\")]),_vm._v(\" which has a command \"),_c('code',[_vm._v(\"!cat\")]),_vm._v(\" locked behind the permission \"),_c('code',[_vm._v(\"can_cat\")]),_vm._v(\".\\n Let's say that by default, the plugin allows anyone to use \"),_c('code',[_vm._v(\"!cat\")]),_vm._v(\", but we want to restrict it to moderators only.\\n \")])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('p',{staticClass:\"mb-1\"},[_vm._v(\"\\n 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.\\n Let's say you're using various incremental levels instead: 10, 20, 30, 40, 50...\"),_c('br'),_vm._v(\"\\n We want to make it so moderator commands are available starting at level 70.\\n Additionally, we'd like to reserve banning for levels 90+ only.\\n To do this, we need to \"),_c('strong',[_vm._v(\"replace\")]),_vm._v(\" the default overrides that enable moderator commands at level 50.\\n \")])}]\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--2!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../node_modules/source-map-loader/index.js!./Permissions.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--2!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../node_modules/source-map-loader/index.js!./Permissions.vue?vue&type=script&lang=js&\"","\n \n Permissions in Zeppelin are simply values in plugin configuration that are checked when the command is used.\n These values can be changed with overrides (see
\n The simplest way to control access to bot commands and features is via permission levels.\n These levels are simply a number (usually between 0 and 100), based on the user's roles or user id, that can then\n be used in permission overrides. By default, several commands are \"moderator only\" (level 50 and up) or \"admin only\" (level 100 and up).\n
\n\n Additionally, having a higher permission level means that certain commands (such as !ban) can't be used against\n you by users with a lower or equal permission level (so e.g. moderators can't ban each other or admins above them).\n
\n\n Permission levels are defined in the config in the levels section. For example:\n
\n\n\n For this example, let's assume we have a plugin called cats
which has a command !cat
locked behind the permission can_cat
.\n Let's say that by default, the plugin allows anyone to use !cat
, but we want to restrict it to moderators only.\n
\n Here's what the configuration for this would look like:\n
\n\n\n 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.\n Let's say you're using various incremental levels instead: 10, 20, 30, 40, 50...
\n We want to make it so moderator commands are available starting at level 70.\n Additionally, we'd like to reserve banning for levels 90+ only.\n To do this, we need to replace the default overrides that enable moderator commands at level 50.\n
\n Here's what the configuration for this would look like:\n
\n\n