1
LazyBadger
New Smarty Variable wanted - $xoops_ismoduleadmin

As I learned, xoops_isadmin is true only for users, which have any rights in administration of XOOPS system.
And it give me two problems
1. Pure module's admins haven't "Administration" link in User menu
2. If I want enable to module's admin some additional right on site, I have to do it with each admin's group (my config isn't "standard" - each module have separate group in members groups, in which I add modules's admins and I have ~30-40 modules om my test site), and it's long-time and not bullet-proof solution.
$xoops_ismoduleadmin = 1 for any user, added to any group with administration access to some module can solve my problem (and I think, can be usable in common for all)

2
rowdie
Re: New Smarty Variable wanted - $xoops_ismoduleadmin
  • 2005/1/15 13:25

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


This behaviour has been changed. See this bug report for details.

Now if the user is in the module where they are admin, $xoops_isadmin will be true. If they are in another module, it is false.

I thought I could use the system rights trick to make my admin link show, but that doesn't work anymore. I gave a user admin rights for avatars, but they still only see the admin link on the module which they are allowed to administrate.

So I don't think we need a $xoops_ismoduleadmin , because that is what $xoops_isadmin does. We need a global value, $xoops_admin or something. It would need to check each user to see if they have any admin rights for any module, including the system module.

3
LazyBadger
Re: New Smarty Variable wanted - $xoops_ismoduleadmin

Quote:

Now if the user is in the module where they are admin, $xoops_isadmin will be true. If they are in another module, it is false.

Well, it's mostly useless
Imagine situation, where I want to give module's admin access to admin area over "Administatration" link in User menu, but - User Menu shown only on main page.
User can't reach admin area, except entering address in location bar

Quote:

I gave a user admin rights for avatars, but they still only see the admin link on the module which they are allowed to administrate.

I gave for "user search" and module's admin have admin link on main page (XHLDs admins)

Quote:

So I don't think we need a $xoops_ismoduleadmin , because that is what $xoops_isadmin does. We need a global value, $xoops_admin or something. It would need to check each user to see if they have any admin rights for any module, including the system module.

Well, it's what I tried to said

4
rowdie
Re: New Smarty Variable wanted - $xoops_ismoduleadmin
  • 2005/1/16 10:52

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


Yes, I agree with you. I had the user menu only on one page as well, which means admins don't get a link to the administration section.

In my case it didn't really matter, it is only a small site and I could give other admins full rights to all modules, but this could be a very big issue for some.

Rowd

edit: "user search" worked? I missed that, will have to test now to see why my avatars permissions didn't work...

5
LazyBadger
Re: New Smarty Variable wanted - $xoops_ismoduleadmin

Quote:

"user search" worked? I missed that, will have to test now to see why my avatars permissions didn't work...

It was OK in my test, but... in any case I did't want to give some additional privileges to module's admin this way - IP addresses of visiters become visible - and finished with "While we haven't better solution, please remember URL /admin.php"

Login

Who's Online

1014 user(s) are online (36 user(s) are browsing Support Forums)


Members: 0


Guests: 1014


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits