Software /
code /
prosody
Comparison
core/moduleapi.lua @ 12651:1ce98f27eabe
moduleapi: Remove redundant expansion of ':' prefix in permission names
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 20 Jul 2022 13:07:04 +0200 |
parent | 12650:e08bf2ad67da |
child | 12652:30e2a0107217 |
comparison
equal
deleted
inserted
replaced
12650:e08bf2ad67da | 12651:1ce98f27eabe |
---|---|
615 hosts[self.host].authz.add_default_permission(role_name, permission); | 615 hosts[self.host].authz.add_default_permission(role_name, permission); |
616 end | 616 end |
617 | 617 |
618 function api:default_permissions(role_name, permissions) | 618 function api:default_permissions(role_name, permissions) |
619 for _, permission in ipairs(permissions) do | 619 for _, permission in ipairs(permissions) do |
620 permission = permission:gsub("^:", self.name..":"); | |
621 self:default_permission(role_name, permission); | 620 self:default_permission(role_name, permission); |
622 end | 621 end |
623 end | 622 end |
624 | 623 |
625 function api:may(action, context) | 624 function api:may(action, context) |