Denied read in acl

If i have a acl file with read mode for everybody, how can i denied someone that access?

I mean, if i have a rule like that for everybody:

   @prefix   acl:  <>.
    @prefix  foaf:  <>.

        a               acl:Authorization;
        acl:agentClass  acl:AuthenticatedAgent;                   # everyone
        acl:mode        acl:Read;                                 # has Read-only access
        acl:accessTo    <>;  

and another rule for someone like that:

@prefix  acl:  <>.

    a             acl:Authorization;
    acl:accessTo  <>;
    acl:agent     <>.

does bob have acces to shared-file1?

Yes you can have different rules for different agents on the same resource. In fact, look at the ACL file for your /public/ folder. You’ll see that the owner has all permissions but the general public only has read permission.

In your example, you could give Bob and only Bob Write access. If all you want to do is give Bob read access, you don’t need the second statement because he, as an authenticated user, is granted that in the first statement.

AFAIK, there is currently no way to allow access to everyone except Bob and no way to specifically say that an agent is denied access. It seems to me that something like “acl:mode None” would allow you to do this but that’s not in the spec.

Ok, thanks, i will search more about the “acl:mode none”.
It would we really good if acl could manage the denied permissions easy, a lot of apps and options could be make.

I just made up acl:None as an example, AFAIK it doesn’t exist.

1 Like