Comments (5)
After some discussion with pulser
on IRC, it sounds like we have two choices: a full RBAC system (maybe based Flask-Principal for instance) or homemade decorators.
A proposed API would be a permissions
module, exposing multiple decorators that would look like:
@permissions.global_admin
@permissions.domain_admin
@permissions.owner
Still, the permissions checks would require that the manipulated object is requested from database. So permissions checks would raise 404 errors, which sounds like an unrelated responsibility. Still no idea on how to fix this while still using decorators.
from mailu.
Permissions and confirmation forms were merged in a module named access
. Current permissions API exposes:
# Enforces global administration privileges
@access.global_admin
# Model must be an Email subclass or Domain, the key must be a URI key
# Makes sure that the domain or the email's domain is managed by the current user
@access.domain_admin(model, key)
# Model must be a User or any model featuring a field named 'user' (Fetch and maybe some other user-specific resources later)
# Makes sure that the user belongs to a domain managed by the current user or is the current user itself
@access.owner(model, key)
from mailu.
I finished migrating all access-control features to the access
module, removed the utils
module and created a simple permissions audit script to avoid any surprise in the future.
from mailu.
And the audit script revealed a permission issue with domain deletion, which is great.
from mailu.
I just opened #55 for review before I merge anything into master due to the depth of some changes involved.
from mailu.
Related Issues (20)
- IPv6 and Docker userland_proxy
- Unable to Set Up Amazon SES for Sending Email from Mailu [SMTP]
- Connect Mailu to Nextcloud's CalDav/CardDav services
- Customize unbound configuration to enhance DNSSEC, DoT, unbound-control HOT 1
- webmail (roundcube) wouldn't start when using override php file HOT 2
- No volumes after deployment HOT 1
- Feature Request: Use Configurable Domain Instead of Hardcoded 'example.org' in start.py HOT 1
- Fail2Ban is no longer working for Mailu 2.0 and documentation provided. HOT 3
- Where to find the Dockerfile for the mailu/clamav image HOT 1
- snappymail integration broken with TLS_FLAVOR=notls in master HOT 3
- Link to admin UI in roundcube broken for `WEB_WEBMAIL` path with more than two subdirectories HOT 4
- integration with google, google can't send mailu invites HOT 1
- SSL Cert served is Empty (LMTP) from Mailu-front when Mailu is trying to auto respond HOT 1
- Placeholders in autoconfig file are not replaced HOT 1
- ooo is broken when proxy protocol is in use
- Is relay supported by sending domain?
- imap container doesn't support IPv6 clients over proxy-protocol HOT 2
- ISRG_X1 not included in fullchain.pem (--> DANE validation failed) HOT 5
- 收国外邮件延迟很大
- front container crashing after upgrading to 2.0.39 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mailu.