Author Topic: Set a usergroup as 'admin'  (Read 2504 times)

0 Members and 1 Guest are viewing this topic.

Offline [TS] mindfulhacker

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Set a usergroup as 'admin'
« on: January 25, 2015, 07:06:29 AM »
I have multiple variations of my staff groups, eg Admin and Admin+.

However, those in Admin+ cannot use admin tools, such as FPP.

Is there any way to set my Admin+ group as 'admin', allowing the IsAdmin() to work?

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: Set a usergroup as 'admin'
« Reply #1 on: January 25, 2015, 08:06:57 AM »
You'll probably want to look into your inheritance tree. From the sounds of things, you have that set up wrong.
bw81@ulysses-forums ~ % whoami
Homepage

Offline [TS] mindfulhacker

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Set a usergroup as 'admin'
« Reply #2 on: January 25, 2015, 08:22:07 AM »
I don't believe I have done it wrong - It is exactly how I would like.

I have 2 'trees' of inheritance.

The Donator Tree:
  • superadmin - Inherits from HeadAdmin
  • HeadAdmin - Inherits from Admn+
  • Admin+ - Inherits from Moderator+
  • Moderator+ - Inherits from TrialMod+
  • TrialMod+ - Inherits from DiamondVIP
  • DiamondVIP - Inherits from PlatinumVIP
  • PlatinumVIP - Inherits from GoldVIP
  • GoldVIP - Inherits from SilverVIP
  • SilverVIP - Inherits from BronzeVIP
  • BronzeVIP - Inherits from user

And the Regular Tree:

  • Admin - Inherits from TrialMod
  • Moderator - Inherits from TrialMod
  • TrialMod - Inherits from user
  • user

This is so non-donor staff do not use the donator jobs, etc.


Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: Set a usergroup as 'admin'
« Reply #3 on: January 25, 2015, 08:32:10 AM »
Going loosely off this FAQ thread, forked inheritance trees usually cause problems with can_target. Seeing as none of the groups you've made inherit from admin or a group which inherits from admin... you aren't gonna get very far.
bw81@ulysses-forums ~ % whoami
Homepage

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Set a usergroup as 'admin'
« Reply #4 on: January 25, 2015, 11:39:06 AM »
for IsAdmin to work you need to inherit from Admin.
None of your groups inherits Admin so that's why it's not working.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Set a usergroup as 'admin'
« Reply #5 on: January 25, 2015, 01:29:15 PM »
"Admin" is also not the same as "admin".
Lua is case sensitive.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Set a usergroup as 'admin'
« Reply #6 on: January 25, 2015, 04:04:40 PM »
This is true. Another reason why in general you should just keep all of your group names lowercase.