Comments (5)
Related issues: #5, #25 -- Aka, we've talked about this before. 😏
from django-todo.
Interesting question. I think I was just going for a safe "least privilege" scenario, and thinking of it like a Jira board where a manager controls the lists and staff work on those lists (which has been the case everywhere I've worked). But I can imagine all sorts of permissions / privileges scenarios that are different between projects. The challenge is in tackling that in a clean way that scales to different projects with differently named groups, code that calls a central permissions system without a ton of if/then conditionals all over the place, etc. And I don't have a clear picture in my mind of how that might work. I wouldn't want to dictate the Group names that have to be in place, for example.
The best I can think of would be to have a TODO_PERMISSIONS
dictionary in settings, where keys are privilege names and values are lists of groups:
TODO_PERMISSIONS = {
"can_create_lists": ["Managers", "Coders", "Visitors"],
"can_delete_lists": ["Managers", "Coders"],
"can_complete_tasks": ["Stunt Pilots", "Visitors"],
}
And then have a shared function that returns bool by consulting this mapping against the current user, and finally a template tag to wrap that function. So then you could use things like if can_create_lists: blah blah
either in python or in template code.
Other ideas?
from django-todo.
I welcome contributions on this feature, fwiw - let me know if interested.
from django-todo.
@shacker @ezzra how about https://github.com/dfunckt/django-rules ?
from django-todo.
I'm a big fan of django-rules, but since todo is a plugin for existing sites, I'm very interested in keeping the number of dependencies as limited as possible. I'll think about it...
from django-todo.
Related Issues (20)
- Social message response HOT 4
- Django HOT 1
- Where do i place the Navigation CSS? HOT 2
- TypeError: view must be a callable or a list/tuple in the case of include(). HOT 2
- Login Loop HOT 2
- Add Task Button not responding HOT 5
- pip install django-todo didn't install bleach HOT 1
- Match registered users sending emails to tracker and add them to "created by" HOT 1
- setup.py imports django, which it shouldnt HOT 6
- Occasional crasher when importing CSVs HOT 7
- Failed migration
- Self Test Fails HOT 1
- Add SECURITY.md HOT 2
- Please do docker-compose HOT 8
- Demo `500: Hard Crash` when entering comments HOT 2
- manage.py is missing HOT 1
- python3 manage.py migrate todo: multiple exception types must be parenthesized HOT 2
- todo/home.html not extending project home.html
- pipenv path and executable path issues HOT 3
- Relate tasks to other objects HOT 2
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 django-todo.