Problem/Motivation
Tracking issue for the 8.x port of Field Permissions.
Proposed resolution
An initial port is underway at https://github.com/drugo32/field_permissions/tree/8.x-1.x
Remaining tasks
Add an 8.x branch here on d.o., and potentially a new maintainer(s).
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #37 | fix-permissions.patch | 12.52 KB | asibona |
| #31 | field_permissions.patch | 26.77 KB | asibona |
Comments
Comment #1
sickness29 commentedStart working.
Comment #2
Rj-dupe-1 commentedAny progress?
Comment #3
Rj-dupe-1 commenteddouble post
Comment #4
nebel54Are you still working on the migration?
Comment #5
fgmFWIW, the availability of
hook_entity_field_access[_alter]seems to indicate this should not be too difficult. The hooks are triggered individually on view/update/delete.The main issues are probably:
Comment #6
toamit commentedThis would be a very useful module to port to D8.
Comment #7
toamit commentedWondering when the drupal 8 porting will start for this module, as this it is quite fundamental to many tasks.
Comment #8
AndyLicht commentedHi, have someone started with porting this module to D8?best regards andy
Comment #9
andypostLooks now is a right time to port
@sic looks nobody works on that
Comment #10
francewhoaRelated pages
We would be happy to contribute testing patch, quality assurance, documentation, and agile project management services if needed
Comment #11
j.longneck commentedThis module would be essentiel for my new D8 project. Any progress appreciated a lot. All the best, John
Comment #12
tomsm commentedI also need this module to migrate my D6 site to D8. Thanks...
Comment #13
shabirahmad commentedWhat's the progress on the port process. I would like to port this module to d8 if anyone is not doing it already.
Comment #14
toamit commentedI recommend you go ahead with the port, the module contributors have shown no interest in responding to this thread, even after reaching them via pm. While you are at it create a sandbox project, that ways it can be a new module rather than being at the mercy of non responsive module authors.
Comment #15
martinma commentedHm. I am just also waiting for the port of this modul. Unfortunately i am not a coder ... :-(
But there is still some information how to build such a modul:
https://api.drupal.org/api/examples/field_permission_example!field_permi...
Comment #16
ptmkenny commentedIt looks like Asibona has started work here:
https://github.com/drugo32/field_permissions/
Comment #17
asibona commentedhttps://github.com/drugo32/field_permissions/
Hi, Is there plans to introduce D8 version of this module? We (@InternetDevels team) would like to help you with development of this version. Thanks, sic.
I put the changes on the master and now it works and if you want you can test,
Comment #18
mile23Could we please have an 8.x-1.x branch to patch make issues against?
@asibona: It'd be great to port the tests, too. https://www.drupal.org/node/2166895 https://www.drupal.org/node/2118119
Speaking of Examples, there's an 8.x version of field_permission_example already: https://www.drupal.org/project/examples
Comment #19
mirom commented@asibona: I created pull request to your GitHub, so you are now able to edit fields without several fatal errors.
Comment #20
asibona commented@Mile23 :Immediately creates a branch called 8.x-1.x. and thanks a lot for the sample link.
@mirom : Thank you so much I try to take your branch and to do testing. :)
Comment #21
mirom commented@asibona - thanks, any luck so far?
Comment #22
asibona commented@all Hi guys i'm finishing to write test, when i finish i will push in 8.x-1.x drupal branch, i think do it in weekend :)
Comment #23
asibona commentedhi guys.
I added the permissions to administer the module and the first test file in remote branch 8.x-1.x.
I continue to write the rest of tests on the comment fields and on users fields.
:)
Comment #24
w01f commentedHi asibona, I just wanted to thank you. This module is one of the big ones I use for my sites so I really look forward to the d8 port, and I really, really appreciate all your hard work!! =D
Comment #25
joco_sp commentedHow is the work on this going on?
Comment #26
asibona commentedwell, the module is testable, I'm finishing up writing tests.
Comment #27
joco_sp commentedGreat! :)
Which branch do we use: 8.x-1.x or test?
I am referring to this --> https://github.com/drugo32/field_permissions/tree/8.x-1.x
Comment #28
asibona commented@joco_sp then use the 8.x branch - 1.x
write me if you have problems :)
Comment #29
asibona commented@all PULL REQUEST
I solved many bugs and now passes the test !!!
for the moment only on the body of a new content.
:)
good evening.
Comment #30
mile23Could you please provide a patch here so we can put it in the project repo?
Thanks.
Comment #31
asibona commentedHi @Mile23 here is the patch, let me know if it works.
Comment #32
joco_sp commentedI am testing the 8.x branch - 1.x for a couple of days and it seems to be working fine.
Will keep you posted if I try it on other fields or if I encounter some issue.
I am testing it on core 8.0.6
Testing on: Entity reference - Taxonomy term fields
Comment #33
asibona commented@joco_sp thank you.
Comment #34
asibona commented@All
HI.
I finished writing the comments and fix the code to make php-cs.
the next step
I add JavaScript to manage the permissions matrix
and I write tests for other cases.
I just finished loading a patch,
Comment #35
napche commentedI created a patch which only creates permissions when field_permissions is used on a field. This prevents the permissions table to get overpopulated when installing the module.
Comment #36
asibona commented@Napche
Thanks a lot. :)
That was one of the things that I needed to continue with the tests.
:)
Comment #37
asibona commentedI went push the several changes.
Including the previous field_permissions.no_permissions_for_default_type.2196303.patch. #35
I add hook_help descriptions
add file field_permissions.links.menu.yml
and I have added more consistent comments to the functions.
Comment #38
cgoffin commentedChecking the field permissions on a field located on the user (profile) form results in an error (Call to undefined method Drupal\user\Entity\User::getOwnerId()). Added a patch to fix this error.
Comment #39
asibona commented@cgoffin Oh yeah.
I think we have to add fields to comments and taxonomies.
Thank you :)
Comment #40
asibona commented@All
Hey guys
I added the js library. :)
missing only to write the test !!!
Comment #41
asibona commented@All
I have push all commit to branch 8.x-1.x
Comment #42
joco_sp commentedI found a bug with the Boolean fields.
You can see more about the error and setting in the attached images.
So far it seems to work with:
- Entity reference - Taxonomy term fields
- Image
- File
- Inline entity reference
- Text area with summary
Comment #43
asibona commentedTanks @joco_sp
I just finished loading a patch.
By.
Comment #44
cgoffin commentedThere was a bug in the patch of comment 38. Patch added.
Comment #45
asibona commented@cgoffin Thank you very much.
Comment #46
asibona commentedHi to all
I added the test and fixed SOME bugs :)
In testComment four tests fail, but I'm working.
I still have to work on the field comment related to the node,
for the moment
work in comment field.
work in node.
work in user.
In taxonomy field on term can not implement, because It not has author.
in the future
implement on Field_collection
I found a bug doing tests,
in field_permissions.schema.yml
error : {"permission_type_body" not schema mapping present}
I added in files.
Field_permissions.settings:
type: config_object
label: 'Field UI settings'
mapping:
permission_type_body:
type: integer
label: 'Value public private custom permission'
But we must implement Dynamic type with [%parent]
Thank you all
Comment #47
c-logemannComment #48
jhedstromSetting to NR since there are patches here.
Could somebody update the issue summary, and perhaps update #2608918: [field_permissions] Field Permissions to describe the current status of the port? It's hard to tell whether folks should be focused on the github repository, or if we could get an 8.x branch created on drupal.org, then folks would focus on the issue queue.
Comment #49
asibona commentedI work out the last bugs (#46) and try to push on the repository of drupal.org.
Comment #50
asibona commentedyeah !! :D
I fixed the bug.
NOTICE: the value of the fields is to be inserted again.
I'm improving the code and the comments, and then I'm doing the commit on drupal.org.
Comment #51
asibona commentedI made a request to implement the permissions on the FIeldcollection type.
https://www.drupal.org/node/2734551
Comment #52
asibona commentedI simplified the code , and disabled tests for the comment field.
I commit it on drupal.org.
For the moment I am trying to solve the compatibility with field_collection isseu.
Comment #53
asibona commentedHI @ALL
I'm watching this guide
https://www.drupal.org/node/711070#start
but I do not understand how to create the starting branch , someone wants to help me out? Or possibly make the initial commit?
thank you!!! :)
Comment #54
colan@asibona: Thanks for all of your work on this.
I didn't get a chance to do a thorough review, but in taking a quick look, I see lots of spelling and grammar problems in the patch. In places, these are making the code difficult to read. Would it be possible for us to get this edited before it's committed?
I'm also seeing a lot of code blocks commented out. These need to be removed.
Did you get commit access to the project from the current maintainers? If not, you'll need that before proceeding. Or we can also have the existing maintainers commit this once the status changes to RTBC.
For branching help, see Creating a branch or tag in Git.
Comment #55
asibona commented@colan Thanks for the answer :)
I try to clean up the code and remove the unnecessary comments.
Every time I add something I create the patch with the changes, is it ok?
Once I am finished with this, I will contact with the current maintainers.
Bye bye.
Comment #56
dpi@asibona
It is unnecessary to continue to upload patches. Apply your changes to the existing module Git tree so there is continuity, then make the module available as a Drupal.org sandbox or Github.
It will make review much easier since it a bulk change. Viewing diffs (patches) tells us nothing when you are doing a big change like D7 -> D8.
Comment #57
dpiLet the maintainers and the followers of this thread know of major changes by posting a comment here.
I skimmed through and saw a lot of calls to the global Drupal object. Please familiarise yourself with dependency injection.
Comment #58
asibona commented@dpi
ok tanks, :)
Comment #59
asibona commentedI Push a new the changes, :)
Now it works on the comment fields.
I finish writing the test and create new repositories.
By.
Ale :)
Comment #60
skinThanks very much :-)
Comment #61
jhedstromUpdated the IS to point at the GitHub repo.
@asibona here are a few comments on the state of the port:
LICENSE, and then parts of thefield_permissions.info.yml file that are automatically added by Drupal.org)I think next steps are for somebody to apply to help maintain this project, as I don't know if any of the current maintainers are active enough at this time to take this on.
Comment #62
jhedstromI was mistaken on this point. Another module and set of permissions was interfering with access.
Comment #63
jhedstromI opened #2754699: Offering to co-maintain Field Permissions to try and get this moving along.
Comment #64
jhedstromI've merged @asibona's branch from github here on Drupal.org. Thanks so much @asibona!
I'm closing this out as there is now a branch here to file additional issues against.