Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read only #11

Closed
3 tasks done
maxime-rainville opened this issue Nov 23, 2020 · 7 comments
Closed
3 tasks done

Read only #11

maxime-rainville opened this issue Nov 23, 2020 · 7 comments
Assignees
Labels

Comments

@maxime-rainville
Copy link

maxime-rainville commented Nov 23, 2020

Story

As a CMS User I want a to know when a LinkField is in a readonly state so that I have a clear understanding that I can not edit this link.

Acceptance criteria

  • A read only UI for the link field has been designed and implemented in consultation with design team.
  • User can still look at the link data in the modal, but cannot interact with it when the field is in a Read only state.
  • Consider what to do with the existing $this->getOwner()->canEdit() checks on LinkField.php and MultiLinkField.php - see ENH Tidy up permissions #141 (comment)

Exclude

  • Handling list of links with mix-permission.

Note

  • The Modal already has canEdit checks, so part is partially working.
  • There's already checks at the API level to make sure you can't write object you don't have access to.

PR

@maxime-rainville
Copy link
Author

@silverstripeux ^

@sachajudd
Copy link

Please see updated designs.

@sabina-talipova
Copy link
Contributor

Design team asked about the following changes:

  • 'Update' button be grey instead of green so that is looks disabled.
  • Fields to not be clickable at all. There should also be some sort of note in the pop-up saying that they don't have permission to edit the link.

@sabina-talipova
Copy link
Contributor

sabina-talipova commented Jan 19, 2024

Design team asked about info message for read only form. Something like this.

Screenshot 2024-01-19 at 11 54 13 AM

@emteknetnz
Copy link
Member

emteknetnz commented Jan 23, 2024

@sabina-talipova I've had a look at the AC Consider what to do with the existing $this->getOwner()->canEdit() checks on LinkField.php and MultiLinkField.php - see https://github.com/silverstripe/silverstripe-linkfield/pull/141#discussion_r1433406199 and it seems like we don't need to change anything

I've ticked of the checkbox for that AC

@sabina-talipova
Copy link
Contributor

@sabina-talipova I've had a look at the AC Consider what to do with the existing $this->getOwner()->canEdit() checks on LinkField.php and MultiLinkField.php - see https://github.com/silverstripe/silverstripe-linkfield/pull/141#discussion_r1433406199 and it seems like we don't need to change anything

@emteknetnz, do you mean we don't need to change UI if user use method setReadonly?

@emteknetnz
Copy link
Member

No that's not what I meant

On the issue linked on that AC it referring to the value passed from PHP to JS in LinkField/MultiLinkField $data['canCreate'] = $this->getOwner()->canEdit(); and if we need to update that based on the work we're doing in this PR. I don't think we need to update it since this appear to be working as you'd expect them to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants