Closed srenault-meeds closed 1 year ago
@margondicco for review
ok go func
@srenault-meeds 1/ should we consider the edit permissions designed in this MIP comment: https://github.com/Meeds-io/MIPs/issues/92#issuecomment-1742425191
...I have an edit option proposed so I can open a WYSIWYG inline with simple options in the editor toolbar ...I can decide to open the advanced editor in a new tab. Thus, the notes pages opens ...I save my edition, the content is displayed as expected
As you may know, eXo is reworking the notes editor style to be specific to Notes CKEditor (in MIP #71). How can we deal with this difference knwing that the description style in edition
will be different from view mode
style ? Should we bring this difference of style in Inline CKEditor
as well ? Should we fix the work done in MIP #71 to make the style compliant and giving a real WYSIWYG effect ?
We may need to wait for MIP #71 to be finished in order to work this switch the result made.
1/ yes for permissions indeed. I will update the description.
2/ Regarding your concern regarding MIP #71 yes, let's talk about it during product committee today.
Ready for Review by DAO members (eXo: @rdenarie )
Ready for Review by DAO members (eXo: @rdenarie )
Modified to enhance productivity and common components centralization in order to allow reusing stuff for future CMS Based Portlets.
Go tech
A small adaptation has been made in Tech Spec knowing that the changes to make on Notes editor will not generate too much conflict with #71 @rdenarie
The modification is about this updated section:
Thus a dedicated set of UI component has to be defined to allow the extensibility of current Notes Editor application. To do this, the Notes Editor shouldn't be altered but redefined in a new UI component which will reuse some components for the whole display
to
Thus a small adaptation will be made on Notes Editor to hide the title and display the target page name in top of Editor.
PRs ready to review by DAO members ( eXo: @rdenarie )
PRs ready to review by DAO members ( eXo: @rdenarie )
Two feedbacks are received that will be considered in this MIP:
All PR validated
All PR validated
Thanks, merged.
Rationale
As a platform admin, it is not possible to add text and to display it in a page. Yet, we aime to deliver a public page soon and we need to have something available so the admin can add texts.
1. Functional Requirements
Top User Stories
As a platform admin or a space host, I can add text in a page using "Single Note View Portlet".
Precision
First I have no need to edit the layout as I have no access to do such action. So I have an edit option proposed so I can open a WYSIWYG inline with simple options in the editor toolbar:
Then I can decide to open the advanced editor in a new tab. Thus, the notes pages opens. This note is not in any space for now.
Once I save my edition, the content is displayed as expected (WYSIWYG speaking)
AND I can edit or remove it thanks to a three dots option displayed when hovering it.
Impacts
NA
Gamification
NA
Notifications
NA
Analytics
NA
Unified Search
NA
2. Technical Requirements
Security
The SNV portlet (same as Links) content access has to follow the following ACL rules:
Who can Edit it
Who can Access it
Upgradability
(Same as Links Portlet) When the
merge
oroverwrite
import mode are applied to pages, the portlet settings has to remain as was set using UI.Feature Flags
No feature flag
3. Software Architecture
Security
The BaseCMSPortlet introduced in #92 will be reused to rely on the same Permission settings of CMS portlets. The permissions algorithm as
LinkService#hasAccessPermission
andLinkService#hasEditPermission
has to be reused to secure the access to REST endpoint.Access
A new REST endpoint has to be implemented in order to allow adding and retrieving notes content by portlet setting name (this name is stored in portlet preferences as unique identifier of the portlet settings). This REST endpoint will apply the CMS based applications
Access Control List
algorithm check (See above).Services & processing
Knowing that the Notes Service API has been reworked recently to manage only Pages/Notes from Spaces, an adaptation has to be made to allow storing
system
notes that aren't accessible via regular notes Tree.To do this, a
system
user owner will be used instead. When editing inFullPage
mode, the UI components are quite different from regular edition mode. Thus a small adaptation will be made on Notes Editor to hide the title and display the target page name in top of Editor.As done for
LinkPortlet
, aNotePageView
portlet will be added that will rely on a unique Setting Name attached to each Portlet instance and stored in preferences. A dedicated REST Endpoint will be used to retrieve and modify the note page by name switch CMS Based Permission algorithm. The name of the page will be exactly the same asSetting Name
stored inPortlet preference
to allow retrieving the note.In order to simplify re-using the same strategy as
Links
portlet, aCMSService
will be added to centralize the Access & Edit permissions check switch space identifier & pageReference. At the same time, this Service will implement a reusable strategy to allow associating a setting name to a page reference and space identifier usingMetadataService
. In fact a newMetadataType
will be defined to allow such association to not having to change existing data models to add references to pages where the content has been added. Using the newCMSService
Service, a genericCMSPortlet
can be added to simplify future implementations for CMS based portlets in order to centralize the ACL & Page association computing by reducing at the same time the complexity of developing new CMS portlets.Data and persistence
No change is needed in Notes DB entities.