#Role Based Permissions

1 messages ยท Page 1 of 1 (latest)

upbeat fog
#

Are you trying to expand on the permissions that foundry has or to just add a way to quickly give permissions to a player by role

timber harness
#

2nd one

#

My need is more about defining groups/roles so that granting a certain permission level to the role/group indirectly gives that permission to the players who are that role/a part of that group.

upbeat fog
#

What if the player has permission and the role takes it away, which would win?

timber harness
#

Highest permission wins I guess.

#

Although the module could have a setting to disallow the allocation of permissions to individuals altogether.

upbeat fog
#

How does this not exist? give me a second, I can answer your question.

timber harness
#

There is a module called 'Permission Viewer' which already helps to some degree in having 2 groups of players in one world, since it makes permissions of each document visible on screen. But another mod (or maybe an extension of Permission Viewer) to introduce the notion of permission groups/players roles would be nice, wouldn't it?

fiery gust
#

The tricky thing is gonna be that permissions are stored for individual IDs per-Document. So, you would either need to extend User with something that knows how to recursively check permissions or iterate through every document in the world updating permissions when the user's group changes.

timber harness
#

Permission viewer:

upbeat fog
#

though this does mean that if any other module overrides the same function in foundry, it would break your module. But thats whay libWrapper is for.

fiery gust
upbeat fog
timber harness
#

I know very little of the FoundryVTT API, I only just started building a system.
But yeah, if this can be implemented with only overrides at User level without having to touch Documents themselves, then it seems to be a reasonable thing to attempt.

fiery gust
#

It's one of those "in theory, I think it's doable, but I don't envy you trying to do it" things. But if you do pull it off in a flexible and extensible way, it would be a great module to publish

upbeat fog
#

Oh I so wanna try this, I'd love making this.

#

Are you in a rush, I can start it after I update my module today. See if I make any progress over the next few days.

timber harness
#

I'm a bit puzzled by the fact that the Permission config sheet is called 'Default Journal Entry Sheet' (sounds like the sheet for journal items themselves..)

upbeat fog
#

you just care about renderPermissionControl

#

The sheet itself doesn't really matter (sorta a lie but not really)

fiery gust
timber harness
#

I think, yes, that this kind of module would have good success in the community.

#

There's my use case (2+ groups playing in the same world) but I'm sure there are other use cases where people would find it useful.

#

There is a reddit thread somewhere where a few people were lamenting that it's not an option already in FoundryVTT.

upbeat fog
#

It makes giving access to documents alot easier, instead of setting everyone, you give them a role, and bam, if that role has permission all users in that role has permission

fiery gust
#

Yeah, I can see it being useful for West Marches games if it's extensible and handles inheritance right

upbeat fog
#

its less clicks

fiery gust
upbeat fog
fiery gust
upbeat fog
#

Either way, I think the idea is really interesting, so I am going to take a look into it and see what I can do. I make no promises.

timber harness
#

great if you want all players to have the same permission level yes, but doesn't support multiple groups.

upbeat fog
#

Now I forgot why I even game to this channel. lol

timber harness
#

Nice. Well you can already count on me to test it, provide feedback, suggestions and promote it whenever I can ๐Ÿ˜‰

fiery gust
timber harness
#

A later step could be to ensure compatibility with the 'Permission Viewer' module (i.e. have a color defined for each role maybe?). Then that'd be the perfect spot for anyone trying to run multiple groups in the same world.

#

But without it, it'd be great already tbh.

upbeat fog
#

I am almost done fixing the issues CSwendrowski (just to make sure discord doesn't force tag them) caused my module by "borrowing" my design. So once that is up and running I can start working on this.

fiery gust
#

You can type CSwendrowski, just don't include the @ if you don't want them pinged

upbeat fog
fiery gust
#

If I ping people by accident, I just shrug it off. It's not the end of the world

timber harness
#

I would have though you can't ping someone in a thread they haven't joined yet. But I never tried. ๐Ÿ˜„

upbeat fog
fiery gust
#

Yeah, pinging someone pulls them into a thread

timber harness
#

Alright. Anyway thanks @upbeat fog for taking an interest in this and volunteering. You're a boon to this community. ๐Ÿ™‚

#

(I hope this sounds right, I'm French..)

upbeat fog
#

It sounds fine. Its funny you say that... I was just yelling about the translation files in relation to css

timber harness
#

I suppose I can offer fr.json files for your modules, in exchange for your work on this permission-related one ๐Ÿ˜„

upbeat fog
#

My modules don't have a lot for words, I am a UI/UX designer, so most of my focus is improving foundry's user experiance.

#

But if I do get this role permission thing to work, it is going to have to have some text somewhere. lol