serge-web / serge

Serious Gaming, Evolved - web interface
https://sites.google.com/deepbluec.com/serge/
Apache License 2.0
14 stars 4 forks source link

User should unable to delete item when this user don't have permission for update properties the item #2954

Open Tristina1788 opened 2 months ago

Tristina1788 commented 2 months ago

🐞 Bug description

User should unable to delete item when this user don't have permission for update properties the item

🔢 Steps to Reproduce

  1. Play game 'TestHat' with role Blue - Co1
  2. Draw a new item on CoreMapping Channel
  3. Logout game
  4. Play game 'TestHat' with role Red- Red2
  5. Notice user Red2 can't update the item (on step2)
  6. Selete 'Delete' icon on right tool to delete the item
  7. Notice the item can be deleted

Note : Current permission on Red

const redParticipant: ParticipantMapping = {
  forceUniqid: 'f-red',
  roles: [],
  subscriptionId: 'aaaa',
  forRenderer: [coreRenderer.id, milSymRenderer.id],
  phases: [Phase.Planning, Phase.Adjudication],
  pType: PARTICIPANT_MAPPING,
  permissionTo: {
    'f-red': [MappingPermissions.ViewSpatial, MappingPermissions.MoveResize, MappingPermissions.AddRemove, 
      MappingPermissions.ViewProps, MappingPermissions.EditOwnProps],
    'f-blue': [MappingPermissions.ViewSpatial] 
  } 
}

⚙️ Expected behavior

User should unable to delete item when this user don't have permission for update properties the item

🖥️ Screencast

https://github.com/serge-web/serge/assets/107697044/04432b2d-da11-40d2-9acd-cb7bf6731cdc

💻 System information

📝 Additional context