Hi Folks,
So I have a question about how best to implement a permission structure
for an app I'm writing.
The app is a way of automating running commands on different servers.
So my command model looks like this:
class Command(models.Model):
command_type = models.ForeignKey(CommandType)
name = models.CharField(maxlength=200)
command = models.TextField()
description = models.TextField(blank=True, null=True)
Basically, what I want is to be able to control which users can run
which commands using the Django user/group setup. So, for instance I
could create a group called "Ops" and then assign which commands that
group has access to, and a group called "Customer Service" and give
them access to a different set of commands.
I don't think the permissions structure is quite flexible enough for
this, as I think I would need to create a new permission for each
group, right? And this would only be tied to the Django auth_group in
my code, not in any other way. But maybe this is the only way of doing
it?
My other thought was to create a separate model called CommandPerm and
then have a foreign key in the command field and then in my code assign
certain groups access to certain CommandPerm entries. Seems a little
clunky as well, though.
Any thoughts appreciated.
Thanks, Tom
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---