ULX

Author Topic: Can't disable inheritance on my rank Minge  (Read 2733 times)

0 Members and 1 Guest are viewing this topic.

Offline Games_Arsenal96

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Can't disable inheritance on my rank Minge
« on: July 10, 2016, 06:51:50 PM »
This sub-forum is only for help or discussion regarding projects created by Team Ulysses. If you are requesting help, please search the forums FIRST to make sure your question has not already been answered. If you still need help, fill in the following information.

My ULib/ULX versions (run "ulx version" in console):
ULib v2.61w
ULX v3.71w

>>Problem<<
   I made a Minge rank to punish players that are bad. It is supposed to remove all access from everything except ulx motd.
   I am trying to disable everything but I can't disable inheritance from user rank therefore the Minge rank still has some commands.
   I was also trying to disable No-Clip for them how will I do this?
>>Problem<<

Game mode(s) I am having this problem on:Sandbox

Lua errors shown in console, if any:
Code: [Select]
None

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Can't disable inheritance on my rank Minge
« Reply #1 on: July 11, 2016, 05:11:36 AM »
While writing this, I have thought of another solution:

Either through a custom command or a hook, add the permissions that the 'user' group has to the specified player's deny list. This should result in them having no access.



Warning: The following solution is terrible. It will eat up your disk space, slow your server to a crawl, and kidnap your dog. You probably shouldn't use it. Proceed at your own risk.


The only way around this that I can think of is to create a second 'user group' (named something other than "user") and give it the permissions you want everyone to have, and then remove all permissions from the actual 'user' group.

You would have to get some form of an autopromote system to automatically promote all new users to this group.

ULib (the addon that handles the groups in ULX) doesn't seem to be built for this kind of functionality. There is a per-user deny list, that will override any permissions the user is given due to their group, but there isn't (as far as I can tell) a per-group deny list.


This solution is far from ideal. Adding every single user that ever joins your server to a group will negatively impact performance due to the large files that ULib/ULX needs to sift through to determine access. In order for this to be remotely feasible, you would need to periodically (at least once a month, possibly weekly or daily depending on how large your player base is) prune the users.txt file.
« Last Edit: July 11, 2016, 05:13:35 AM by roastchicken »
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Can't disable inheritance on my rank Minge
« Reply #2 on: July 11, 2016, 12:43:23 PM »
I wanted to see if I could write something for you, just to see how easy/hard it would be. But I have a question, is it the default noclip you want disabled or ulx noclip you want disabled? Or, both?


EDIT: Also, what are the default permissions for your 'user' group so I know specifically what to deny?
« Last Edit: July 11, 2016, 12:48:48 PM by iViscosity »
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Can't disable inheritance on my rank Minge
« Reply #3 on: July 11, 2016, 03:43:48 PM »
....and kidnap your dog

Whew. My 4 cats are safe!


Ahemm....
* JamminR clears his throat.
In partial agreement with RoastChicken's input.
Don't over think it.
I'm not sure this is a ULX limitation, so much as a Gmod limitation.
To Gmod, we are all users, unless we're admin or superadmin.
Use ulx groupdeny minge "ulx command_you_don't_want"
Code: [Select]
o ulx groupdeny <group> <command> - Remove from a group's access.Deny's take precedence over allows, no matter who is inheriting what.
You'll need to deny each command individually.
XGUI should allow you to do this too I'm pretty sure.

As for noclip denial, you'll need a new mod.
Or, take away server noclip, and allow ulx noclip to the lowest group level you want (which seems to be users in your case)
   
« Last Edit: July 11, 2016, 03:47:53 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Undercover Orange

  • Full Member
  • ***
  • Posts: 139
  • Karma: -14
  • Leader of Undercover Gaming Community
Re: Can't disable inheritance on my rank Minge
« Reply #4 on: July 12, 2016, 02:36:28 AM »
i may have a salution.... go to addons/ulib/data/ulib/ click group.txt find the rank and delete the line that says
"inherit_from"   "user"
this may work
~ Undercover Orange

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Can't disable inheritance on my rank Minge
« Reply #5 on: July 12, 2016, 10:53:45 AM »
i may have a salution.... go to addons/ulib/data/ulib/ click group.txt find the rank and delete the line that says
"inherit_from"   "user"
this may work
No, see, if it inherits from 'user' it would have all of the permissions 'user' would have. Because the default group is 'user' no one would have permissions if he were to do it like that. Disabling could cause errors and just not a great idea.

Also, I could see if I could write a quick script to see if I can do it, and it should be fine unless A LOT of people join, at the same time.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Can't disable inheritance on my rank Minge
« Reply #6 on: July 12, 2016, 01:49:22 PM »
i may have a salution.... go to addons/ulib/data/ulib/ click group.txt find the rank and delete the line that says
"inherit_from"   "user"
this may work

No, see, if it inherits from 'user' it would have all of the permissions 'user' would have. Because the default group is 'user' no one would have permissions if he were to do it like that. Disabling could cause errors and just not a great idea.

Also, I could see if I could write a quick script to see if I can do it, and it should be fine unless A LOT of people join, at the same time.

It simply doesn't work. Groups inherit from user even if you remove the "inherit_from" line.
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: Can't disable inheritance on my rank Minge
« Reply #7 on: July 12, 2016, 02:15:50 PM »
It simply doesn't work. Groups inherit from user even if you remove the "inherit_from" line.
More importantly, modifying the ULib data files by hand is a dangerous task. You really shouldn't be touching them unless you know what you're doing.
bw81@ulysses-forums ~ % whoami
Homepage

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Can't disable inheritance on my rank Minge
« Reply #8 on: July 12, 2016, 03:10:20 PM »
I've already provided the best solution as of this moment with the way Gmod works.
Again, as stated by a previous poster, removing the inherit from still doesn't stop Gmod from making someone inherit user.
Again, in Gmod, if you aren't admin or superadmin, no matter what group you are, you are also 'user'.
Gmod limitation.
Not ULib.

Use groupdeny on Minge the ulx commands user has that you don't want them to have.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming