Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: kawajax - helmikuu 05, 2014, 03:57:27 AP

Otsikko: Hide database page?
Kirjoitti: kawajax - helmikuu 05, 2014, 03:57:27 AP
I need to disabled "database and Path" page to everyone, even admin (find attached which to be disabled). Where is the code which i can do that (remove code)?


Sorry, my lousy english and thanks for your patience..
Otsikko: Re: Hide database page?
Kirjoitti: kawajax - helmikuu 05, 2014, 04:39:09 AP
Finding right file by myself :D

Need edit Source/Admin.php to:

Lainaa//               'database' => array($txt['database_paths_settings']),
Otsikko: Re: Hide database page?
Kirjoitti: The Wizard - helmikuu 05, 2014, 06:28:07 AP
This is not a good idea at all, and I strongly advise you not to do this.

Wiz
Otsikko: Re: Hide database page?
Kirjoitti: kawajax - helmikuu 05, 2014, 07:06:40 AP
Lainaus käyttäjältä: The Wizard - helmikuu 05, 2014, 06:28:07 AP
This is not a good idea at all, and I strongly advise you not to do this.

Wiz

Why?
Otsikko: Re: Hide database page?
Kirjoitti: The Wizard - helmikuu 05, 2014, 09:42:30 AP
Before I answer the question would you be so kind as to tell me why you wanted to remove it?

Wiz
Otsikko: Re: Hide database page?
Kirjoitti: kawajax - helmikuu 05, 2014, 10:03:12 AP
Lainaus käyttäjältä: The Wizard - helmikuu 05, 2014, 09:42:30 AP
Before I answer the question would you be so kind as to tell me why you wanted to remove it?

My hosted forum, couple administrator which i personally don't know. And i don't want at they see my SQL information.

I don't see problem to add //, database information already in it, and it's easily restore.
Otsikko: Re: Hide database page?
Kirjoitti: margarett - helmikuu 05, 2014, 10:08:49 AP
While I also don't see a problem with it, I can tell you this:
If you don't trust him, why make him administrator in the first place? :P
Otsikko: Re: Hide database page?
Kirjoitti: kawajax - helmikuu 05, 2014, 10:31:00 AP
Lainaus käyttäjältä: margarett - helmikuu 05, 2014, 10:08:49 AP
If you don't trust him, why make him administrator in the first place? :P

I don't tell at i'm not trust (them), this is only for sure.

Otsikko: Re: Hide database page?
Kirjoitti: The Wizard - helmikuu 05, 2014, 11:15:57 AP
Did you set up the smf or did the other admin?

if you answered yea the other admin set up smf -
Did the other admin that set up the smf make you register, and then make you a admin? If so then you are not the MAIN Admin and the the other admin can delete you, but you will not be able to delete them. Its a smf fail safe.

If you are the main admin you should be able to set the permissions on the other admins as to what they can use or see. same goes for the moderators.

Wiz



Otsikko: Re: Hide database page?
Kirjoitti: Illori - helmikuu 05, 2014, 11:27:45 AP
Lainaus käyttäjältä: The Wizard - helmikuu 05, 2014, 11:15:57 AP
Did the other admin that set up the smf make you register, and then make you a admin? If so then you are not the MAIN Admin and the the other admin can delete you, but you will not be able to delete them. Its a smf fail safe.

SMF has no such fail safe and most likely never will.
Otsikko: Re: Hide database page?
Kirjoitti: The Wizard - helmikuu 05, 2014, 11:44:55 AP
LainaaSMF has no such fail safe and most likely never will.

It did at one time - not sure if it's still there.





Otsikko: Re: Hide database page?
Kirjoitti: Illori - helmikuu 05, 2014, 11:48:16 AP
Lainaus käyttäjältä: The Wizard - helmikuu 05, 2014, 11:44:55 AP
It did at one time - not sure if it's still there.

it does not at this time and i really doubt it ever did.
Otsikko: Re: Hide database page?
Kirjoitti: kawajax - helmikuu 05, 2014, 12:23:33 IP
Lainaus käyttäjältä: The Wizard - helmikuu 05, 2014, 11:15:57 AP
Did you set up the smf or did the other admin?

if you answered yea the other admin set up smf -
Did the other admin that set up the smf make you register, and then make you a admin? If so then you are not the MAIN Admin and the the other admin can delete you, but you will not be able to delete them. Its a smf fail safe.

If you are the main admin you should be able to set the permissions on the other admins as to what they can use or see. same goes for the moderators.

Wiz

I set up forum, i'm first admin, i have access database, i have access files and folders of server. I have all rights.

And there is no options where you can turn off access to database information from other admin.

And, still waiting answer for question "Why?"  ::)
Otsikko: Re: Hide database page?
Kirjoitti: busterone - helmikuu 05, 2014, 12:30:07 IP
By default, "admin" has access to every aspect of the forum.  If you do not want to have other admins to have access to certain areas, then do not make them admins, but instead, global moderators.  Global moderators do not have access to the sensitive areas.
Otsikko: Re: Hide database page?
Kirjoitti: kawajax - helmikuu 05, 2014, 12:37:01 IP
Lainaus käyttäjältä: busterone - helmikuu 05, 2014, 12:30:07 IP
By default, "admin" has access to every aspect of the forum.  If you do not want to have other admins to have access to certain areas, then do not make them admins, but instead, global moderators.  Global moderators do not have access to the sensitive areas.

That's not a option. Forum is for learning of administration ;)
Otsikko: Re: Hide database page?
Kirjoitti: margarett - helmikuu 05, 2014, 12:41:33 IP
I'd say, keep up with the fix you found. I tried that here and that section becomes totally inaccessible, even if you type the complete URL to it.
Otsikko: Re: Hide database page?
Kirjoitti: The Wizard - helmikuu 05, 2014, 01:26:04 IP
Answer:

If something happens to your forum you might need to get into the Database and Paths area to fix the problem, and what are you going to do if you can't accesses it? As margarett has pointed out even if you do remeber the url you can't get back in. 

Plus for time to time smf gets updated and at some point or another you will have to redo the code change you made.

I agree with busterone it's better just to make them a Global moderators - less trouble all around.

It your decision what to do as it's your forum and you have a right to do what you want. I gave you my two cents worth.

Wiz

Otsikko: Re: Hide database page?
Kirjoitti: kawajax - helmikuu 05, 2014, 01:43:29 IP
Lainaus käyttäjältä: The Wizard - helmikuu 05, 2014, 01:26:04 IP
Answer:

If something happens to your forum you might need to get into the Database and Paths area to fix the problem, and what are you going to do if you can't accesses it? As margarett has pointed out even if you do remeber the url you can't get back in. 

Plus for time to time smf gets updated and at some point or another you will have to redo the code change you made.

What prevent to add database info straight to Settings.php? Or remove that // from admin.php?

And update of forum give you note if code is changed,  so you can restore it before continuous update.

I guess at there is no problem to use that mod what i done. At least it's works by now :)