diff options
Diffstat (limited to 'acf/model/model.lua')
-rw-r--r-- | acf/model/model.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/acf/model/model.lua b/acf/model/model.lua index 0a312a3..365fe20 100644 --- a/acf/model/model.lua +++ b/acf/model/model.lua @@ -103,4 +103,10 @@ function Model:init(context) if not field.compute then field:validate_saved() end end end + + if self.has_permission then + function mt.has_permission(user, permission) + return self:has_permission(user, permission) + end + end end |