Previous Entry Share Next Entry
Release 0.10.6 -- Introducing Roles
jducoeur wrote in querki_project
[Oops -- meant to post this on Friday.]

Today, we begin to fight back against the problem that Querki's security model, while quite powerful, is much too hard to use. Over the next couple of months, I'm going to be introducing some layers that should simplify things a good deal. One of the first steps is adding Roles.

All Members of a Space have one or more Roles, where a Role grants you additional permissions to do stuff in the Space. Precisely speaking, when User U tries to do Action A to Thing T, we check Permission P. We ask, in this order:

-- Does T explicitly say who has permission? If so, only allow those people to do it.
-- Otherwise, does T have an ancestor Model that specifies who has Permission P? If so, use that.
-- Otherwise, does U have a Role which has Permission P? If so, allow it.
-- Otherwise, does the Space specify who has Permission P? If so, use that.

Basically, the change here is adding that third step. The effect is to say that, unless the Thing or Model overrides it, grant this Permission to all Users who have this Role.

All of which is a fancy way of saying that you can use Roles to say who can do what, across this Space. Power users can override this on a Thing-by-Thing or Model-by-Model basis, but I expect that to be unusual: my guess is that most people, most of the time, will just use Roles to manage the Space, and not try to be fine-grained about it.

For the moment, you can only have one Role -- the out of the box Roles "stack", with ever-growing powers, so there's no point in worrying about multiple Roles -- but the underlying mechanism will allow finer-grained combinations for power users eventually. The initial Roles are:

Basic Member: has no particular extra rights. (This exists solely because the UI makes more sense if everybody has one of the standard Roles.)
Commentator: can read Things, and can Comment.
Contributor: can create new Things, and edit existing ones.
Editor: currently this doesn't do anything interesting, but soon Editors will be allowed to design Models, and eventually they will have Moderation powers.
Manager: currently this doesn't do anything interesting, but in the long run this will have nearly all the same powers as the Owner of the Space.

Each of these has all the permissions of the Roles above it. Basically, the notion is to boil things down to some common use cases, and make them easier to use. I suspect this list will need some evolution yet, but it's a decent start.

At least for the time being, you manage Roles on the Actions -> Sharing and Security page. When you invite people to join your Space, you can now specify which Role they should have when they join; this choice is persistent, so it'll remain in place the next time you do invitations. And you can select individual members of the Space, and change their Roles to give them more or less power.

Note that there is one moderately serious bug in the current design: you can't use Roles to make the Space itself readable. This is actually a long-standing bug in the way Properties are designed, relating to the way that the Space's own Permissions become the defaults for everything else in the Space. I'm pondering what to do about that, but for now please don't set Who Can Read on the Space to Owner -- it'll prevent your Members from entering the Space.

Also in this release, I fixed a regression from earlier in the week: the changes to move to the new Thing Editor broke reification of Tags. A Tag isn't really a Thing -- it's just a name. But in many ways it *looks* like a Thing: you can click on it, which takes you to a page that shows all of the references to that Tag. You can even tweak your Space to say how to display Tags. But if you click the Edit button, it "reifies" that Tag, turning it into a real Thing that can be edited and can have additional Properties. Reification doesn't quite fit the current Thing Editor approach, and Wednesday's release broke it. I've switched things back so that reification uses the old Advanced Editor for now. Sometime in the near future, we'll make reification work with the Thing Editor, so it looks consistent with the new look-and-feel.


Log in

No account? Create an account