1
rh94040
Group based access rights?
  • 2004/6/10 23:34

  • rh94040

  • Just popping in

  • Posts: 51

  • Since: 2004/4/13


I have a pretty basis need. Some of my XOOPS URLs should
only be accessible by users from group A, but not anonymous users or users from other groups.

I'm on XOOPS 2.0.6 and I tried to do this using WFChannel 1.06. The problem with this is, although WFChannel provides
an admin interface to "Check the boxes of those pages each group is allowed to view", it doesn't really work. Even though a page is unchecked for anonymous user group, for example, everybody can still access it. When it's implemented
in the main menu, unchecking a page only hides it from the WFChannel submenu. But an anonymous user can still access the page by going to its URL directly.

Any other modules to achieve what I need?

Thanks much,
Ray

2
Herko
Re: Group based access rights?
  • 2004/6/11 6:40

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


This is because of an error in the groupaccess file, it will be fixed in the soon-to-be-released 2.0.7 bugfix release.

Herko

3
rh94040
Re: Group based access rights?
  • 2004/6/12 0:38

  • rh94040

  • Just popping in

  • Posts: 51

  • Since: 2004/4/13


Great.

Could you let me know when this will be? I have a site that needs to go-live soon and it's partly dependent on this. Could you post the groupaccess bug fix first just in case the release date slips?

Thanks much,
Ray

4
Mithrandir
Re: Group based access rights?

I'm not really sure Herko has got the right end of the stick here.

rh94040 says that permissions are not recognized. What we have fixed in 2.0.7 is the fact that if you use multiple GroupPermForms, they will overwrite each others.

There is no groupaccess.php file in the core, so unless the error is connected to the above fix, I don't think it will be fixed automatically with 2.0.7

You can try, however, to apply this groupperm.php from News module which is the fixed file from 2.0.7 - it goes into the modules/system/admin folder

5
rh94040
Re: Group based access rights?
  • 2004/6/12 21:13

  • rh94040

  • Just popping in

  • Posts: 51

  • Since: 2004/4/13


Hi Mithrandir,

I used the groupperm.php file as you recommended, and the same
problem still persists. If I access a WFChannel URL (pagenum=xxx), it displays regardless of what permission I've assigned to it via its admin interface.

Thanks,
Ray




6
rh94040
Re: Group based access rights?
  • 2004/6/12 21:36

  • rh94040

  • Just popping in

  • Posts: 51

  • Since: 2004/4/13


Can somebody explain to me how to code group access control in XOOPS 2.0.6?

What APIs are used to implement group access control on a XOOPS URL?

What tables are affected?

Thanks much,
Ray

7
Mithrandir
Re: Group based access rights?

The XoopsGroupPerm and XoopsGroupPermHandler classes handle group permissions in XOOPS core.

Basically, a group permission has:
1) A name (e.g. "module_read" or "news_submit")
2) An itemid (e.g. the newsstory topic)
3) A groupid (the group which has access - one record per group)
4) A moduleid

The grouppermhandler class has one very important method:
checkRight, which is used to check if a group (or an array of groups) have permissions to a certain name on a certain item in a certain module.

Also, addRight is used to set a permission if not using a XoopsGroupPermForm to set permissions.

I believe the table is `groupperm` but I'll have to check. More information on group permissions are in the dev.xoops wiki

8
rh94040
Re: Group based access rights?
  • 2004/6/13 0:25

  • rh94040

  • Just popping in

  • Posts: 51

  • Since: 2004/4/13


Thank you. I'd like to find out if this is a generic bug in group based access control, or in WFChannel. Formulaire, for example, implements some group access control (anonymous or not) and that works fine.

Following your guide above, in WFChannel, the index.php file should call the checkRight method somehow, to determine whether permission should be granted, correct?

Thanks,

9
rh94040
Re: Group based access rights?
  • 2004/6/13 0:35

  • rh94040

  • Just popping in

  • Posts: 51

  • Since: 2004/4/13


I checked WFChannel 1.0.6's index.php, and it only calls
checkRight when it's constructing the menu items under Main Menu, and nowhere else. This could explain why a page is
not displayed if it's unchecked in the permission page, but
it seems that it's not doing the check when the page URL is being accessed (index.php?pagenum=xxx).

Am I making sense here?

Sorry for being pushy but this is a very basic requirement
of my site before it goes live.

Any help would be appreciated.

Thanks,
Ray

Login

Who's Online

433 user(s) are online (117 user(s) are browsing Support Forums)


Members: 0


Guests: 433


more...

Donat-O-Meter

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

Latest GitHub Commits