Author Topic: How do I do make my groups target other groups like this?  (Read 496 times)

0 Members and 1 Guest are viewing this topic.

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 684
  • Karma: 95
  • :)
    • View Profile
    • My Homepage
Re: How do I do make my groups target other groups like this?
« Reply #15 on: December 19, 2016, 12:38:10 PM »
*cracks knuckles*
I've put light thought into the idea, but haven't come up with much yet. gl;hf
bw81@ulysses-forums ~ % whoami
Homepage

I have 10 more Keybase invites! PM me for more information or to request one!
An easy intro to PGP and public-key cryptography

Offline gamexplor

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: How do I do make my groups target other groups like this?
« Reply #16 on: December 19, 2016, 02:18:46 PM »
You have Operator AND Donator inheriting from user, which means you have a split inheritance (or branching) tree. What they're suggesting is have it in a linear tree, where only one group inherits from another (like the default user < operator < admin < superadmin). The reason those groups can target higher groups like that is because they are not in the same branch, which means most of their inheritances and can_targets don't apply. You need to have it in a linear tree, like (user < donator < trialmoderator < dtrialmoderator < etc.)

In other words, make each group inherit only from the group directly below it, with that group inheriting from the one directly below it. Make sure no two groups inherit from the same group.

I hope that makes sense.

Edit: As a side note, not a great idea to have a group inherit from superadmin, as Garry's Mod recognises superadmin as having root access. Read more here: Groups vs. Teams - Why having an owner group is useless and stupid

Sent using Tapatalk. Owner of iViscosity Gaming.

Here, let me help you visualize the issue:


This is what we mean when we say "inheritance branching"- all of your groups are not connected in a single line. The ULX targeting system does not work well with these kind of setups, unfortunately. It's a known limitation we plan on addressing in ULX 4.

The reason why this doesn't work is, well, let's focus on your can_target for 'dtrialmoderator'. Currently, you have it set to '!%moderator', which means that 'dtrailmoderators' can't target anyone in the group moderator, or any group that inherits from moderator (this is what !% does, the ! just inverts it). So in your terms, it's saying "dtrialmoderator can't target moderator and dmoderator". However, this says nothing about operator, noaccess, or any of your other groups.

Now, you would think you could just specify '!%moderator,!%admin' so that 'dtrialmoderator' can't target moderators or above AND admins and above, but the comma is a SET UNION operator (in terms of players you can target), and the end result is that they cancel each other out, and they'll be able to target anyone.


So, the first (less messy) solution would be to line up all of your groups so they inherit in a single line. This obviously puts some restrictions on which levels you give access to for certain commands (e.g., if you were trying to put operator between donator and trialmoderator, but you wanted operator to have a specific command that you don't want trialmoderator or higher to have, and you don't want operator to have all of the commands that trialmoderator has). But, you can work around that problem by using groupdeny: In my example, you would give operator the command you want, then groupdeny that command at the trialmoderator level.


The other solution which allows you to keep this branching inheritance requires you to manually specify and maintain a list of groups each group can target. It's a bit tedious to set up, and even more tedious to maintain if you change your group structure, but it is fairly straightforward. Basically, for each group, you just keep a list of all of the groups you want to target using the # operator. To get you started:

Code: [Select]
user: ^
noaccess: ^
This will let user and noaccess (if you want) to only target themselves.

Code: [Select]
operator: #user
donator: #user
admin: #operator,#donator,#user
trialmoderator: #donator,#user
dtrialmoderator: #trialmoderator,#donator,#operator,#user
moderator: #dtrialmoderator,#trialmoderator,#donator,#operator,#user
dmoderator: #moderator,#dtrialmoderator,#trialmoderator,#donator,#operator,#user
admin: #dmoderator,#moderator,#dtrialmoderator,#trialmoderator,#donator,#operator,#user
... and so on.

Thank you very much to both of you! I have managed to fix this issue by deleting the 'noaccess' and 'operator' user group, which maybe wasn't the best option. But it worked as they were having to be targeting 2 groups.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 7525
  • Karma: 336
  • Sertafide Ulysses Jenius
    • View Profile
    • Team Ulysses [ULib/ULX, other fine releases]
Re: How do I do make my groups target other groups like this?
« Reply #17 on: December 19, 2016, 03:29:28 PM »
Stickly, for ULX 4, I want that data text visualization method incorporated into XGUI.
So basically, I could take groups like that, drag/drop the ovals in between, and have XGUI adjust the inheritance like so.
Imagine Scratch programming language, but, for XGUI and group management. Snap.... click .. inherit set .. can_target default to not above.
:P

Gameexplor, if you bump one more time in less than 72 hours, I'm banning you.
We told you your answer several times, if you don't understand it then you need to ask differently.
This is a slow paced forum.
You didn't get lost in the mix... we simply didn't see your last question in the time you impatiently felt you needed.
The price one pays for pursuing any profession or calling is an intimate knowledge of its ugly side. - James Baldwin

Offline gamexplor

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: How do I do make my groups target other groups like this?
« Reply #18 on: December 19, 2016, 04:17:33 PM »
Stickly, for ULX 4, I want that data text visualization method incorporated into XGUI.
So basically, I could take groups like that, drag/drop the ovals in between, and have XGUI adjust the inheritance like so.
Imagine Scratch programming language, but, for XGUI and group management. Snap.... click .. inherit set .. can_target default to not above.
:P

Gameexplor, if you bump one more time in less than 72 hours, I'm banning you.
We told you your answer several times, if you don't understand it then you need to ask differently.
This is a slow paced forum.
You didn't get lost in the mix... we simply didn't see your last question in the time you impatiently felt you needed.

I didn't bump... I said thank you for solving my issue. Wtf?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 7525
  • Karma: 336
  • Sertafide Ulysses Jenius
    • View Profile
    • Team Ulysses [ULib/ULX, other fine releases]
The price one pays for pursuing any profession or calling is an intimate knowledge of its ugly side. - James Baldwin

Offline gamexplor

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: How do I do make my groups target other groups like this?
« Reply #20 on: December 20, 2016, 10:52:54 AM »

I don't remember posting the "...", but I remember saying "bump".
Anyhow the issue is fixed now, so it's all over.

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1229
  • Karma: 156
  • open(my $file, "<README") or die;
    • View Profile
    • XGUI
Re: How do I do make my groups target other groups like this?
« Reply #21 on: December 22, 2016, 09:30:28 AM »
Glad I could help you figure it out!

<offtopic>Huh, nice visualization.
I wonder how hard text-based graphing, especially in Lua, would be. Having a ULX command to draw the inheritance tree to console or something would be useful in visualizing branching inheritance trees like the above.</offtopic>

The whole concept of auto-generated graphs via text descriptions is a fascinating one to me, but it is pretty complex. We do actually have ULib.ucl.getInheritanceTree that you can use with PrintTable as a poor man's graph though. This website uses Graphviz, I highly recommend checking it out and trying it out on a Linux box.

Stickly, for ULX 4, I want that data text visualization method incorporated into XGUI.
So basically, I could take groups like that, drag/drop the ovals in between, and have XGUI adjust the inheritance like so.
Imagine Scratch programming language, but, for XGUI and group management. Snap.... click .. inherit set .. can_target default to not above.
:P

Mmm... That would be nice. Complex to implement, but very nice!
"The stupidity of an individual on the Internet is generally matched only the by size of their ego, unless the individual in question is unaware of both." - Me

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6097
  • Karma: 374
  • Project Lead
    • View Profile
Re: How do I do make my groups target other groups like this?
« Reply #22 on: December 29, 2016, 07:02:46 PM »
Why not pipe the data to webgraphviz or plantuml using the in-game browser? :)
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 7525
  • Karma: 336
  • Sertafide Ulysses Jenius
    • View Profile
    • Team Ulysses [ULib/ULX, other fine releases]
Re: How do I do make my groups target other groups like this?
« Reply #23 on: December 29, 2016, 09:39:55 PM »
Ugh. Would the ingame browser not scream in agony trying some page that dynamic and complex?
:P
The price one pays for pursuing any profession or calling is an intimate knowledge of its ugly side. - James Baldwin

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 472
  • Karma: 83
  • I write code
    • View Profile
Re: How do I do make my groups target other groups like this?
« Reply #24 on: December 31, 2016, 04:10:14 AM »
Those pages seem to do most, if not all, of the processing server-side. They just take some text input and return an image. If Awesomium doesn't agree displaying the webpage, it'd probably be possible to just http.Fetch the image.
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.