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

427 revoked objects should not be editable #433

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

seansica
Copy link
Contributor

Closes #427

Solution

We don't want object's to be editable if an object is revoked and/or when an object becomes revoked. Components that deal with rendering the editing toolbar must be updated to only render when revoked is false.

We can accomplish this with a shared service and a boolean observable called revoked. STIX-based components can sync their nested revoked values (i.e., this.config.object.revoked) to the shared service, and components that depend on the revoked value (i.e., ToolbarComponent) can subscribe to the observable.

workbench-disable-editing-of-revoked-objects

…d to revoked$; modify editable property to only be capable of resolving to true if revoked is false
…d to ensure that subscribers' copies of revoked are kept in sync
…rty is synchronized with the StixViewPage child component currently in view; modify editable property to only be capable of resolving to true when revoked is false
@seansica seansica self-assigned this Jan 20, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@seansica seansica requested a review from clemiller January 20, 2023 21:03
@seansica seansica marked this pull request as draft January 23, 2023 14:49
@seansica
Copy link
Contributor Author

TODO:

Need to add a few things before this can be merged:

  • Add support of this feature to Campaigns
  • Change disabled state to grey out the edit button (as opposed to completely hiding the toolbar)

Base automatically changed from develop to master October 31, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant