Currently I have a mechanism in place which changes readability with custom business logic by overwriting the Page::isReadable() method in page classes in site/models.
Now the desired behaviour would be to permit certain users to see the article, but not edit it. (preferred: the Edit Page with locked forms) How would I go about this?
Overwriting isLocked() does not seem to actually lock the page, also actually locking it using a .lock file just removes everything which is typed without showing an error or displaying to the user in any way that it’s locked, which is sure to gather complaints from users whom might think it’s a bug.
As an idea for future versions: Maybe implement Page::isWritable()?
Can you think of a way to use locking feature for my cause? This way I could weigh my options better.
I thought of something like this in the Page Childclass , but it doesn’t seem to work.
Using a callback works first, but the lock is lifted after the first try. Also removing the lock will probably be a pain, right?