Corgis
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 22BNI_Merge the concept of Shared virtual folder and Lightbox / Collection > [22BNI_Merge the concept of Shared virtual folder and Lightbox / Collection](https://link.orangelogic.com/Tasks/22BNI) [https://link.orangelogic.com/Tasks/22BNI](https://link.orangelogic.com/Tasks/22BNI) Status: To Do | When | Who | What | | -------- | -------- | -------- | | 2022-9-19 | Lanh Nguyen | Initial Creation | ## Why In current implementation, Collections are stored in a dedicated tables XD,XL. It prevents us to manage the permission like what we do for Documents ## Target - Convert lightboxes from a dedicated table to Standard Virtual fodler (Lightbox and Shared lightbox). - Migrate all existing light box to new Virtual Folders - Implement Permission request/ collaborators flows - UI design: https://www.figma.com/file/IQmUET3fxiyswkJomu0Cu2/Merge-the-concept-of-Shared-virtual-folder-and-Lightbox-%2F-Collection-(DO-NOT-MODIFY)?node-id=427%3A204084 ## Implementation plan ### Apply Collection UI for Virtual folder #### 1. UI modification ##### 1.1. Create an activation parameter to enable CollectionsV2 ##### 1.2. Modify the "Add to collection" action to open Old/New Collections UI (2d4h) - Show Albums that you own (you're the createuser) and albums where you have been added as a collaborator (direct permission, not inherited, that info should already be indexed) - Duplicate the LightboxSelection_AddDocuments_VForm and mdify to handle Album (2d) - Confirmation popup with permission details (4h) ##### 1.3. My collections UI (2d4h) - Create new workspace to show collections (4h) - Update Collections Side Panel to display collection V2(8h): The display order in this side panel (and in teh add to collection popup) should be based ont eh CreateDate of the collection, most recent first.We should however in both case preselect / highlight the last collection the user clicked to view or to add assets to. To be stored in user preferences - Dynamic menu actions for the collections (4h) - Update header for collection workspace: Add Share live collection/Creator (4h) ##### 1.4 Add to existing collections (8h) Create 2 actions Add to existing collections: - Add to my collections: Same view as 1.2 - Add to existing collections: Show hierachy tree of all collections that user has permission #### 2. Migrate old Light box to DO_DOCUMENTS Migration flows: ##### Step 1: Migrate all Lightbox related table to DO - Run on Primary and Backup (20h) - Create if not exist a table that lise all the XD record hasn't been migrated yet. Table column: LM_LIGHTBOXMIGRATION: XDRecordID|Migrated|MotherSet - Start or resume migrating XD / XL / CQ to DO / DL/ CZ maintaining the recordids. Would be fast, not trigger replication, executed on Primary and Secondary independently. Would create the self DJ entry and FT entry for each XD - Create self entry on DJ (DO_RecordIDRef=DO_RecordIDChild=XD.RecordID, Level=0) - Create empty Entry on FT table - XD => DO Mapping |XD Field|DO Field| |-|-| |Title|Title| |Id_Client|Id_Client| |CaptionLong|CaptionLong| |Representative_XD|Representative_DO| |RecordID|ProxyForRecordID| |"XD_EXPIRABLEDOCUMENTS"|ProxyForTable| |"Album"|DocType| |""|DocSubType| |RecordID|RecordID| |"XD" + numeric part of recordid|Identifier| - XL -> DL |XL Field|DL Field| |-|-| |DO_RecordIDBot|DO_RecordIDBot| |Position|Position| |XL.DO_RecordIDTop|DO_RecordIDTop| - CQ_CONTACTLIGHTBOXLINKS -> CZ_CONTACTDOCUMENTLINKS |CQ Field|CZ Field| |-|-| |CT_Assigned|CT_RecordID| |CQ.XD_RecordID|DO_RecordID| |CanViewItems|CanRead| |CanAddItems|CanUpload| |CanEditMetadata|CanWrite| |CanShare|CanShare| |CanViewItems|CanFind| |CanManageRights|CanManageRights| |"DO_DOCUMENTS"|LinkedTableName| |EditUserID|CTPermissionEditor| |EditDate|PermissionEditDate| |1|DisableInheritance| - 1st Step: Migrate all Records has CT_Assigned filled - 2nd Step: Migrate all Records has CT_Assigned empty and Email is filled - Select all shared emails `SELECT DISTINCT CQ.Email FROM CQ_CONTACTLIGHTBOXLINKS CQ JOIN XD_EXPIRABLEDOCUMENTS XD ON XD.RecordID=CQ.XD_RecordID AND CQ.Disabled=0 AND XD.Disabled=0 WHERE ISNULL(CQ.CT_Assigned,'')=''` - Create all contacts for list of emails if not exist, contact type: **MailingSubscriber** - Do same run with 1st step but CZ.CT_RecordID = SELECT RecordID from CT_CONTACTS CT Where CT.Email1=CQ.Email ##### Step 2: Set mother for migrated DO (12h) - Run on Primary only - A slower API run only on Primary, throttled to not overwhelm replication to place XDs in the users personal folders (would run 5records/second) - Add all linked assets to DC_lowpriority `SELECT DO_RecordIDBot FROM DL_DOCLINKS DL JOIN LM_LIGHTBOXMIGRATION LM WHERE DL.DO_RecordIDTop=LM.RecordID AND DL.Disabled=0` #### Step 3 (Optional do as last) Migrate LastUseDate to DG_DOCUMENTLOGS (2h) - Migrate all CQ.LastUseDate to DG_DOCUMENTLOGS - Mapping: |CQ Field|DG Field| |-|-| |CT_Assigned|CT_RecordID| |CQ.XD_RecordID|DO_RecordID| |"DO_DOCUMENTS"|ContextualTable| |"VIEW_DETAILS"|Action| |LastUseDate|EditDate| |LastUseDate|CreateDate| |CQ.RecordID|Reference| ### Share Live Collection Flow #### Permission on Collections #### Permission on Assets ![](https://i.imgur.com/TYiqvEd.png) ##### 1. Implement Share Live Collection Popup UI (8h) ##### 2. Update Existing function (2h) - Add new column to CZ ContextualRecordID (varchar 17) - Edit CZ_CONTACTDOCUMENTLINKS_DbBO.RequestPermissions to - Support input ct recordID, if input CT is empty, use current user - Support saving ContextualRecordID ##### 3. Store the assigned permissions on collection (4h) - Do the same at Roles Based permission system to have View/View & Add/Full Control permission on collection ##### 4. Request permission flows Logic + UI (12h) Logic: When **adding new assets to collection** or **share collection to a new user** (4h) - If user doesn't have permission on assets - create new "Access Request Project" - set Approver group (parameter in first phase) to the Approvers - custom field to store "Why access is needed" - add all target users to "Assign to" - create new Relation (Access Request) and assign to Access Request Project-Collection - If the "Access Request Project" exist, add more Assign to and Change status to Pending if it's completed Review Asset Request UI (8h) [Design](https://www.figma.com/file/IQmUET3fxiyswkJomu0Cu2/Merge-the-concept-of-Shared-virtual-folder-and-Lightbox-%2F-Collection-(DO-NOT-MODIFY)?node-id=563%3A197139) ##### 5. Approve flow UI (16h) - Create workspace to display all "Access Request Project" called "Collections Request", table view with field: Collection Name (Parent Title), Why access is needed, Collaborators, Status, Requested By - Create "Open" action to open the "Review Asset Permissions Request" - Create a widget can be displayed on Damview Details has same view as "Review Asset Permissions Request" - When Openning "Access Request Project": - Get all the assets linked to collections that each "Assign to" doesn't have permission - If having a CZ with Status Rejected => show thump down - If no CZ, show ? - When Reject/Approved: - Get the CZ recordID with CT_RecordID = "Assign to", DO_RecordID= current collection (CZ created from [3.Store-the-assigned-permissions-on-collection](https://hackmd.io/-3ItCeO5QKmljrcjPBfFtw?both#3-Store-the-assigned-permissions-on-collection-2h)) - Create new CZ with the same right with the CZ assign to collection the set the RequestStatus to Approved/Rejected 6. Remove Asset from Collections/Delete Collection (4h) - Because when deleting collection + removing asset from Collection, they all remove doclink so put the logic to DL_DOCLINKS_DbBO.PostDelete, when DO_RecordID top is Collections and Table Bot/Top is DOCUMENTS, delete all the CZ has ContextualRecordID = CollectionID - Notes: Keep the soft delete logic. The permission will remaining when collection is deleted (in binned) until collection is permanent deleted

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully