zerodine / MongoDBAclBundle

This bundle allows the use of MongoDB as the storage layer for the Symfony ACLs component.
21 stars 32 forks source link

Add class aces below acl entry creation #17

Closed jvandesande closed 11 years ago

jvandesande commented 11 years ago

My class ace was not attached to the acl entry. This change solved the problem for me. I am not sure if this is the best solution.

The ACL data in MongoDB is:

_aclentry collection

{
   "_id": ObjectId("51c82aa97f6848fb64ff834f"),
   "aceOrder": NumberLong(0),
   "securityIdentity": {
      "role": "ROLE_ADMIN"
    },
   "mask": NumberLong(64),
   "granting": true,
   "grantingStrategy": "all",
   "auditSuccess": false,
   "auditFailure": false,
   "class": "My\\Bundle\\Document\\User"
}   

_acloid collection

 {
   "_id": ObjectId("51c82aa97f6848fb64ff834e"),
   "identifier": "class",
   "type": "My\\Bundle\\Document\\User",
   "entriesInheriting": true
},
{
   "_id": ObjectId("51c8555d7f6848d1c084f0ec"),
   "identifier": "51c2e9707f6848b311e6aa95",
   "type": "My\\Bundle\\Document\\User",
   "entriesInheriting": true
}       
jvandesande commented 11 years ago

@iampersistent could you have a look at this?

iampersistent commented 11 years ago

thanks @jvandesande