Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for restricted classes #14

Open
oscar-broman opened this issue Jun 18, 2012 · 10 comments
Open

Add support for restricted classes #14

oscar-broman opened this issue Jun 18, 2012 · 10 comments
Milestone

Comments

@oscar-broman
Copy link
Owner

I.e. only GROUP_ADMIN can spawn with the chicken skin.

@jte
Copy link

jte commented Jun 27, 2012

I suggest you, if you have time to implement it, to rename this to Acess Control List, it does exactly what you said but covers whole class of problems.

@oscar-broman
Copy link
Owner Author

What do you mean? Create some generic permission system? I'm up for ideas!

@jte
Copy link

jte commented Jun 27, 2012

Something like that, yes. Have a look at Multi Theft Auto's Access Control List. In my opinion it's exactly what you are looking, with some modifications, of course, for example, renaming their concept of 'resource' to yours 'module' will fit perfectly. All in all, i see Access Control List as the best and most flexible solution to this problem.

@Y-Less
Copy link

Y-Less commented Jun 30, 2012

y_groups...

@oscar-broman
Copy link
Owner Author

Yeah, kinda leaning towards just going with y_groups. Though the one thing missing is inheritance.

@Y-Less
Copy link

Y-Less commented Jul 2, 2012

Easy enough to add really, and would address an issue several people have had.

@Y-Less
Copy link

Y-Less commented Jul 5, 2012

I just remembered something. The way y_groups is designed is such that it can be used to set group permissions on any library with "Library_SetPlayer" and "Library_GetPlayer" functions - so if you have your own and have those two functions you can define "Library" and the max number of items in your library, include "y_groups", and now have group permissions.

I mention this for one reason, something I realised was technically possible a while ago but never tried it. One library with this "Get"/"Set" interface is "y_groups" itself! Meaning you can have groups of groups so that when a player gets added to a group, they will get added to all the groups under that group. So really, y_groups DOES have inheritance if you do this (or something like this):

#include <YSI\y_groups>
#define GROUP_LIBRARY_NAME<%0...%1> %0Group%1
#define GROUP_LIBRARY_SIZE MAX_GROUPS
#include <YSI\y_groups>

#undef GROUP_LIBRARY_NAME
#undef GROUP_LIBRARY_SIZE
#undef _GROUP_MAKE_NAME
#undef _GROUP_MAKE_LIMIT 

Then you will have such lovely functions as "Group_SetGroup" and "Group_SetGlobalGroupDefault", the former making a given group a member of another group, the latter making every group a member of every other group (or no groups members of any groups - I suggest you do the latter as a default, also for "Group_SetGroupDefault").

@Jameskmonger
Copy link
Contributor

This has been added, surely?

@oscar-broman
Copy link
Owner Author

Only per-player, not for groups.

@Jameskmonger
Copy link
Contributor

c654624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants