Matthew-Whitlock / FoundryVTT-music-permissions

A module for FoundryVTT which gives control over which roles have permission to do certain music-related actions.
MIT License
4 stars 3 forks source link

Players cannot play music #2

Closed Blacklands closed 2 years ago

Blacklands commented 2 years ago

I'm trying this module for the first time. I'm on Foundry 9.249 (maybe that's already the issue? did something change in the latest version?).

I can modify the permissions of each playlists just fine. If I give a player the permissions to edit a playlist, they can do that just fine. But no matter how I modify any of the settings, no player can play music (neither the whole playlist or individual songs). Yes, even if they're owners of it and everything is set up for that. They always get

Error: You do not have permissions to play from this playlist!

Is that a known bug? I've tried having the player create a whole new playlist, in case the existing ones don't work for some reason. Still doesn't work. I've restarted the world, changed player permissions and changed them back... no dice.

pesky-wobbit commented 2 years ago

Can't play sounds either. Would love to give my players this!

Matthew-Whitlock commented 2 years ago

This is not a known bug. The only locations in the code where that specific error is generated would point to this being an issue with permissions. Could you both check on the module setting for "Playback: " ? This sets a minimum ownership level that players should have of a playlist to be able to play from it.

If you believe you have this and the playlist permissions configured properly please let me know what settings you have currently. Thanks!

Edit: Please also let me know if you have any other music/sound-related modules currently

pesky-wobbit commented 2 years ago

I didn't notice the Playback setting! I fixated on "Minimum Control Permission." Works as intended. Thanks!

On Mon, Feb 28, 2022 at 11:49 AM Matthew Whitlock @.***> wrote:

This is not a known bug. The only locations in the code where that specific error is generated would point to this being an issue with permissions. Could you both check on the module setting for "Playback: " ? This sets a minimum ownership level that players should have of a playlist to be able to play from it.

If you believe you have this and the playlist permissions configured properly please let me know what settings you have currently. Thanks!

— Reply to this email directly, view it on GitHub https://github.com/Matthew-Whitlock/FoundryVTT-music-permissions/issues/2#issuecomment-1054454387, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADUSBRYN77U474B63NQZNDU5ORSFANCNFSM5O4FVHGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.*** com>

Blacklands commented 2 years ago

I have the following module settings:

Playback: All players
Minimum control permission: Observer

At this point I'm just very confused. What is the relationship between the All Players setting and the individual settings, even? There's nothing about this on the Foundry website, it seems...

I would have expected that:

But this doesn't seem to be the case at all. Why is All Players: Observer + user Observer something different (that doesn't work) from All Players: Observer + user Default (that does work)? But then lower permissions do seem to override higher ones (individual None/Limited overrides All Players: Observer). But not the other way around...?


So this means that I can get the module to work if I set the permissions as All Players: Observer and then leave them at Default for the players who are supposed to have access to that playlist, and set them to None for everyone else. But that's not ideal, and I feel like I'm missing something here.

Matthew-Whitlock commented 2 years ago

This was an issue order-of-operations issue with the ?? operator in Javascript - thanks for the extra info on the bug and for reporting it here! It should be fixed in the new release 2.0.1 which I've just published. I'm going to close this, but feel free to reopen or open a new issue if this is still around for you.