Closed birchamp closed 1 year ago
@larsgson @abelpz
Is there a flag in the editor component to specify "read only" (at least as a default - the user should be able to change it).
Which reminds me, the README for the editor needs some work. For example, it would be nice if questions like the above could be found in the README.
@mandolyte there is one button in the toolbar that sets a prop from xelah I beleive, it is the pencil icon in the toolbar, but it seems like even in read-only mode it allows the user to edit the title, unless you also activate the preview button.
As I can see from the source code, you are able to pass the props: {editable: false, preview:true} to the editor components, so no need to modify anything in uw-editor I think, apart from the documentation for it.
I just approved and merged #91 but then looked at this issue and realized it does not follow:
Text comes from local machine - open RW
Uploaded text is now being opened RO by default.
@mandolyte ^^^
This does not seem to be working at all now. Every method is making an editable card. Nothing is read only.
Not sure what happened here.
Note: tested using current deployment https://gateway-translate.netlify.app/ (since it should be merged)
It is working now. Pleas check again.
Cards default to Read only/ Read write on the following conditions: Text comes from user's current Org/lang - open R/W- Works as expected Text comes from local machine - open RW- works as expected Text comes from anywhere else - open RO. Opens in Read only. Users are able to edit by clicking on the Pencil icon and Save the edits if they have permission for the Org/Repo.
Tested with v0.9.0-rc.2 build 29a2450 QA. Looks good
When a card is opened, the text can be viewed read-only (R/O) or read-write (R/W).
DoD:
When the file meets the above criteria it is opened as editable. Otherwise, it is opened as read-only.