We should be able to restrict users to certain platforms somehow. I'm not sure if we should proceed as in sites (where it's a client-based ACL) or by creating a permission per platform (ugly) or even by creating a special permission for "restricted platforms". Any ideas?
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 559450_v3.patch | 9.78 KB | mig5 |
| #5 | 559450_v2.patch | 9.46 KB | mig5 |
| #1 | 558450_restricted_platforms.patch | 4.64 KB | mig5 |
Comments
Comment #1
Anonymous (not verified) commentedBeginnings of a solution.. maybe
It works.
TODO:
1) Only show the allowed platforms in hosting_site_form() instead of all of them (currently it handles what platform the client can create the site on in hosting_site_validate() )
2) Reduce some duplication of code, factor some some stuff into common functions
3) Add an 'Allowed platforms' list in hosting_client_view()
4) Maybe a better solution than comma delimited platform nids in the hosting_client table, but implementing traditional permissions just felt too hard
Comment #2
acsubscribe
Comment #3
Anonymous (not verified) commentedanarcat's pointed out that this should perhaps not be stored in hosting_client, but cleaner to be in its own hosting_client_platforms table.
I'll likely change this tonight so unless you're curious to try the above (which works), perhaps wait til I've updated as it'll save headaches if the data's gonna move into another table.
Comment #4
Anonymous (not verified) commentedComment #5
Anonymous (not verified) commentedForget this stupid patch, it's not working.
Comment #6
Anonymous (not verified) commentedComment #7
Anonymous (not verified) commentedHave it working again. I think. default platform switching (see 5) below) was buggy.
excerpt from earlier:
Comment #8
univate commentedOne simple permission related idea would be to have the ability to hide platforms, at the moment this can be done by unpublishing the platform and this does work although it then doesn't appear in your platform list which you probably still want to happen if you have sites running on it. Its also not as intuitive as having a status field could just state if the platform (active/hidden). The idea with this is it then allows you to stop any new sites from being added to that platform (at least by clients/users).
One problem I see with the current implementation here is that, when you add a new platform you are going to need to go to all your clients and enable that platform manually and there is a similar problem if you want to removing the platform from a lot of clients.
I wonder whether it would make more sense to have the permission on the user instead of the client? Then you could also use roles to manage permission for groups of platforms. There may be a ACL module already that could be used for this.
Comment #9
Anonymous (not verified) commentedI have rolled in Platform access control per client that actually works, into my Platform Management work. #602128: Platform management
I did this because it occurred to me if a user could have the ability to delete a Platform, better that that platform potentially only belong to them and not other clients (even though a Platform can't be deleted unless all sites on it are deleted.. but it can't hurt to be sure)
So please test access control alongside the platform management work, in the dev-platform_management branches in git.aegirproject.org (both repos)
Comment #10
adrian commentedgood work.
this has been merged into master.