Comments (4)
I have the same problem. Any new on this?
from mongodbaclbundle.
Unfortunately, I haven't looked into this yet.
from mongodbaclbundle.
I did look in to this. if instead of:
$acl->insertClassAce($securityIdentity, MaskBuilder::MASK_OWNER);
does $acl->insertObjectAce($securityIdentity, MaskBuilder::MASK_OWNER);
You will have the reference between acl_entry and o_id, but however the Permission Flow doesn't work. If no objectAce exists, it should normally fall back on classAce. But since we do not use classAce it will of course fail.
Why it isn't set for classAce: (MutableAclProvider)
1.
$objectIdentityId = $name === 'classAces' ? null : $ace->getAcl()->getId();
2.
$aceId = (string)$this->insertAccessControlEntry($objectIdentityId, null, $i, $sid, $ace->getStrategy(), $ace->getMask(), $ace->isGranting(), $ace->isAuditSuccess(), $ace->isAuditFailure());
3.
if (isset($objectIdentityId)) {
$criteria['objectIdentity'] = array(
'$ref' => $this->options['oid_collection'],
'$id' => new \MongoId($objectIdentityId),
);
}
The objectIdentity property will not be set in DB.
from mongodbaclbundle.
aborjessen pointed out one part of the problem: In updateAclProperty, no objectIdentity or other reference is set for classAces.
Later, when checking access, the AclProvider will try to get all acl_entries associated with the acl_oid in lookupObjectIdentities with this query:
$entryQuery = array('objectIdentity.$id' => array('$in' => $oids));
$entryCursor = $this->connection->selectCollection($this->options['entry_collection'])->find($entryQuery);
Now the query can obviously not get any aces that do not have an objectIdentity set.
So we need two things
a) Association of classAce with its class in the db
b) A way to query for these class Aces that doesn't have to much overhead
One option is to add a class field to the Ace (always or only if it actually is a classAce), and query for that additionally .
from mongodbaclbundle.
Related Issues (15)
- Is this bundle supported? HOT 4
- composer.json and last mongodb bundle version error HOT 2
- Not compatible with Symfony 2.3 when running composer update HOT 1
- No error is thrown if collections dont exist HOT 2
- Can not call init method from outside HOT 2
- Choosing the mongoId for the UserSecurityIdentity HOT 2
- Undefined index: ancestors HOT 2
- deleteAcl() method of IamPersistent\MongoDBAclBundle\Security\Acl\MutableAclProvider does not work completely well HOT 3
- Update for Symfony 2.1 HOT 5
- AclProvider is calling undefined method $this->updateAceIdentityMap(..)
- ACEs are not deleted when deleting ACL on Class (not instance object)
- How can I retrieve class acl for a object not persisted yet
- Maintance? Symfony ~3.0 HOT 1
- findChildren not work with $directChildrenOnly = true
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongodbaclbundle.