plone / plone.restapi

RESTful API for Plone.
http://plonerestapi.readthedocs.org/
84 stars 75 forks source link

plone.autoform.directives.read_permission doesn’t work in restapi #1662

Closed folix-01 closed 1 year ago

folix-01 commented 1 year ago

plone.autoform.directives.read_permission directives seem to not work with restapi(the field is never shown if use this directive)

davisagli commented 1 year ago

Please give the specific steps to reproduce the problem

folix-01 commented 1 year ago

@davisagli

Just try to sign any field using this techique https://github.com/plone/plone.autoform#:~:text=class%20IMySchema(model.Schema)%3A%0A%20%20%20%20form.read_permission(secret%3D%27cmf.ManagePortal%27)%0A%20%20%20%20form.write_permission(secret%3D%27cmf.ManagePortal%27). And try to test if it is visible via RESTApi of plone

davisagli commented 1 year ago

Which endpoint? What roles does the user have that you are accessing the API with?

folix-01 commented 1 year ago

@davisagli I just tried it on the content get endpoint, using the site administrator and member users.