Archive > 0.5.x Custom/Unofficial Modules

!security Levels

(1/3) > >>

Nytridr:
Seems like we are still having security level problems.  The bot is not retaining what the security levels were and resetting them.


--- Code: ---Security: Access Levels

[Security: Main Menu] [Security: Security Groups]

Org Ranks and Security Groups with Access Level SUPERADMIN

Org Ranks and Security Groups with Access Level ADMIN

Org Ranks and Security Groups with Access Level LEADER

Org Ranks and Security Groups with Access Level MEMBER
+ Org Rank President:
   Change President Access Level To: [SUPERADMIN] [ADMIN] [LEADER] [GUEST] [ANONYMOUS]
+ Org Rank Advisor:
   Change Advisor Access Level To: [SUPERADMIN] [ADMIN] [LEADER] [GUEST] [ANONYMOUS]
+ Org Rank Veteran:
   Change Veteran Access Level To: [SUPERADMIN] [ADMIN] [LEADER] [GUEST] [ANONYMOUS]
+ Org Rank Member:
   Change Member Access Level To: [SUPERADMIN] [ADMIN] [LEADER] [GUEST] [ANONYMOUS]
+ Org Rank Applicant:
   Change Applicant Access Level To: [SUPERADMIN] [ADMIN] [LEADER] [GUEST] [ANONYMOUS]

Org Ranks and Security Groups with Access Level GUEST

Org Ranks and Security Groups with Access Level ANONYMOUS


[Security: Main Menu] [Security: Security Groups]
--- End code ---

There are times when no one is on in org and if the bot restarts for some reason durinng that time it will not retain what the security levels are.

Nyt

Glarawyn:
Bot version?
How many members in your org?
Are you using flexible security groups?
Are you using custom security groups?
Are you using the external script for updating your whois cache on a regular basis?
Do you have alts security on or off?

Temar:
Reply for Nyt ----------
he got SVN
he got alot of members like 500+
duno
duno
duno
on

-----------

i also have same problem and im pretty sure i know what does it i just dont know why

Glarawyn:
For org rank detection to work...

Bot must be a member of the org.
Org roster must be loaded and be in whois cache.
Whois cache must be enabled (is this even an option?)

Line 1716 of Security.php

--- Code: ---guild = $this -> bot -> db -> select("SELECT org_name FROM #___whois WHERE nickname = '".$this -> bot -> botname."'");

--- End code ---
This should probably be redone with a whois call.

The only way I can see the bot forgetting is if the org gov in settings is not the same as the detected org gov. This could happen when the settings module refreshes the settings cache from the database. Try disabling this refresh in the settings module maybe? If a change is detected, Security does reset all the access levels to member automatically. This is expected behavior when you change org governing forms!.

That's my best guess for now. Try commenting line 118 of Settings.php:

--- Code: ---$this -> register_event("cron", "1hour");

--- End code ---

If that solves the problem I'm a good guesser. :D

Alreadythere:

--- Quote from: Glarawyn on October 08, 2008, 05:19:49 pm ---Whois cache must be enabled (is this even an option?)
--- End quote ---
Nope, whois cache is too integrated in the bot.


--- Quote from: Glarawyn on October 08, 2008, 05:19:49 pm ---Line 1716 of Security.php

--- Code: ---guild = $this -> bot -> db -> select("SELECT org_name FROM #___whois WHERE nickname = '".$this -> bot -> botname."'");

--- End code ---
This should probably be redone with a whois call.
--- End quote ---
Yes, unless doing a join with some other table you never should access the whois table directly. Too much side-line intelligence in the whois core.


--- Quote from: Glarawyn on October 08, 2008, 05:19:49 pm ---The only way I can see the bot forgetting is if the org gov in settings is not the same as the detected org gov. This could happen when the settings module refreshes the settings cache from the database. Try disabling this refresh in the settings module maybe? If a change is detected, Security does reset all the access levels to member automatically. This is expected behavior when you change org governing forms!.
--- End quote ---
You should have implemented some kind of hooking for settings changes!

Well, maybe I should add it now, adding a flag and a register function for callbacks isn't that much work.

Would allow me to remove some ugly checks in flexible security...

Navigation

[0] Message Index

[#] Next page

Go to full version