microsoft / live-share-sdk

A framework for building collaborative Microsoft Teams and M365 experiences.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Role Vertification of LiveCanvas not working

httom111 opened this issue · comments

commented

Please review FAQ and Known issues before filing a new item!

  • [ YES ] I have reviewed the FAQ and known issues and did not find my topic

Please note: any submissions with insufficient reproducible information will be marked as 'Waiting for customer input' and may be closed is there is no response

Describe the bug

I am experiencing an issue with the "allowRoles" feature provided by the LiveCanvas library. Specifically, when I set up the system to allow only presenters to modify the canvas, meaning that they can trigger "wet stroke" events. If I understood correctly, only presenters should be able to draw on the canvas, while others should only be able to view it without making modifications. However, in my implementation, attendees are still able to modify the canvas.

To Reproduce

Steps to reproduce the behavior:

Set up the LiveCanvas with only the presenter role allowed to modify the canvas
Attendee attempts to modify the canvas

Expected behavior

I expected that only users with the presenter role would be able to modify the canvas, while attendees would only be able to view it.

Screenshots

UNS}XGJP 1B}QPM7{458T A
SVB$OZLXH@HJDEOVK7B}``V

Desktop(s) (please complete the following information):

  • OS: Windows 10
  • Browser chrome, edge

Additional context

Add any other context about the problem here.

const host = LiveShareHost.create();
const liveShare = new LiveShareClient(host);
const schema: ContainerSchema = { initialObjects: { liveCanvas: LiveCanvas, presence: LivePresence<ICustomUserData> } };
const { container } = await liveShare.joinContainer(schema);
const liveCanvas = container.initialObjects.liveCanvas as LiveCanvas;
const ALLOWED_ROLES = [UserMeetingRole.presenter, UserMeetingRole.organizer];
// Get the canvas host element
const canvasHostElement = document.getElementById("canvas-host");
const inkingManager = new InkingManager(canvasHostElement!);
// Begin synchronization for LiveCanvas
await liveCanvas.initialize(inkingManager, ALLOWED_ROLES);
inkingManager.activate();

I was able to replicate this, looking into it

fix will be deployed in the next release

commented

Thank you for your response. Could you please inform me about the expected release date? I am working on a student project and need to plan around the release schedule.

A new release is going out today @httom111

@httom111 v1.0.2 is now published, give it a try and let us know if you run into any issues. Thanks for your patience.