Guest Level in config.inc.php
Brought to you by:
jberanek
Hello from Germany! I got in contact to MRBS only a couple of days ago. Although not very familiar with PHP and coding I managed to set up a working system - which made me somehow feel like a pro. But I'm not. I use config.inc.php for authentication. Admin and users work fine. My question: How can I add a guest-level (level=0) in config.inc.php?
I tried to add this line of code without success:
$auth["guest"]["guest"] = "guest";
Your help would be highly appreciated.
Joerg
Diff:
There isn't a facility for having guest users in MRBS. I'm not sure why you would want it anyway? If you were able to create a booking as an anonymous user then another person could just as easily delete or edit that booking.
Campbell
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Hi Campbell, thanks for your immediate response. Sorry for not describing clearly enough what I want to do. I would like to define one or more users in config.inc.php who are only allowed to see the bookings. They should not be allowed to create or modify any bookings.
I'm still not quite clear what you want to do I'm afraid. By default guest users, ie users that are not logged in, can see bookings but not create or modify them.
Or do you want to achieve something else?
Campbell
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
I try to put my question in an educational environment: I don't want that anyone who is not registered can see something beside the login screen e.g. pupils. (I configured that already) I want that registered teachers can see the bookings but not change them or enter new ones. (I don*t know how to configure that) Only management staff of the school should be allowed to make bookings.(ALready configured.)
Joerg
OK, I understand now. I think setting
in your config file should do the trick.
Campbell
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Hi Campbell,
thanks for your advice. If I set only_admin_can_book as TRUE nobody else can book.
My idea is to have the following grades:
0 => somebody who knows the URL should only see the Login-Screen (deny public access = true)
1 => a registered user should be allowed to see but not modify or enter bookings
2 => a priviledged registered user with the right to enter bookings (as defined in auth["user"]["name"] = "password")
(3) => admin
Joerg
It's not very easy to do this using the 'config' scheme. However if you switch toi using the 'db' scheme it is easier. I think that if you set
in your config file and then edit the levels for the various pages in mrbs_auth.inc you should get what you want. (If not, you should be pretty close).
Campbell
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Hi Campbell,
I'll read the documentation carefully and try to switch to the db-scheme.
Thanks a lot for your support.
Joerg
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Hello Joerg,
I have the same request as you have. Campbell referred me to this thread.
Have you been able to apply the changes with the extra levels as described by Campbell?
Regards,
Arjen
the Netherlands
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Hi Campbell,
Any change that the extra level will become a standard feature?
Is there a new release planned anyway?
Regards,
Arjen