Reworked configs schema, moved core functionality to a service class, reworked module's structure
Please review my patch
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 2655796-content_access-structure-rework-14.patch | 83.37 KB | id.tarzanych |
Reworked configs schema, moved core functionality to a service class, reworked module's structure
Please review my patch
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 2655796-content_access-structure-rework-14.patch | 83.37 KB | id.tarzanych |
Comments
Comment #2
id.tarzanych commentedComment #3
id.tarzanych commentedHad to bring back
to make Content Access compatible with ACL.
Comment #4
id.tarzanych commentedRemoved ACL dependency from default Content Access test case
Comment #9
id.tarzanych commentedUpdated AclTestCase
Comment #14
id.tarzanych commentedOne more attempt...
Comment #15
id.tarzanych commentedComment #16
lpsolit commentedThe code looks good, but a migration path should exist for the ~1000 installations already using 8.x-1.x-dev, to move data out of the content_access table into the new format. The patch ignores existing settings, which would be a severe regression. A content_access_update_8101() function implementing hook_update_N() should do it.
Comment #17
sutharsan commented@id.tarzanych thanks a lot for the work to replace the procedural code by a service. There is a lot to gain by using services.
My comments on the patch.
Nitpicking...
Don't use abbreviations in method names. 'Gid' -> 'GrantId'
Don't use abbreviations in method names. 'Op' -> 'Operation'
Typo: not 'proccess' but 'process'
Don't use abbreviations in method names. 'Op' -> 'Operation'
As above use 'getRoleIdsPerNodeOperation' instead of 'getRidsPerNodeOp'
Method descriptions should fit on one line. Additional info to be separated with an empty line.
Description is plural ("... settings.") and method name is singular. This is confusing.
Hmm, on a 'get' method I don't expect defaults to be added. (Without reading the code) this note causes more confusion that it is worth.
Missing 'public'
The is not a clear distinction between getPerNodeSetting and getPerNodeSettings, but the description of with _and_ the different variables suggest differently. I suggest to use a better name for one or both.
I suggest to rename to 'setPerNodeSettings'. That is more consistent with get(PerNode)Settings and setSettings.
Typo: "Removes grants that don't change anything."
Pls
Changes like these are not related to using a service instead of procedural code. Imho they should not be in this patch, it causes noise dring the review process.
Comment #18
sutharsan commentedI don't like the introduction of a custom table to store settings. Further it extends the scope of this issue too much. Introducing a service is already pretty big, but only technically. Now we are about to to start a discusion on the storage of settings (configuration). I suggest to remove it from the patch and make a follow-up. That way we can the discuss that separately and keep the 'service' moving.
Comment #19
gisleUnassigning to allow others to finalize this.
Comment #20
gisleThis should go into the version compatible with Drupal 10.
Comment #21
steven jones commentedSorry to do this, but I'm going to close this very old issue down.
I suspect we'll get there eventually, but I think this issue was trying to do too much all in one go.
If someone wants to be inspired by it, lets pick off the logical pieces one-by-one rather than trying to do it all in one monster patch.