Menu

#276 Guest Level in config.inc.php

None
open
nobody
None
1
2014-08-19
2012-09-10
Anonymous
No

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

Discussion

  • Campbell Morrison

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,7 +1,10 @@
     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"; 
    +
    +~~~~~~
    +$auth["guest"]["guest"] = "guest";
    +~~~~~~
    
     Your help would be highly appreciated.
    
    • milestone: -->
     
  • Campbell Morrison

    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

     
    • Anonymous

      Anonymous - 2012-09-12

      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.

       
  • Campbell Morrison

    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

     
  • Anonymous

    Anonymous - 2012-09-12

    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

     
  • Campbell Morrison

    OK, I understand now. I think setting

    $auth['only_admin_can_book'] = TRUE;
    $auth['deny_public_access'] = TRUE;
    

    in your config file should do the trick.

    Campbell

     
  • Anonymous

    Anonymous - 2012-09-16

    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

     
  • Campbell Morrison

    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

    $max_level = 3;
    

    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

     
  • Anonymous

    Anonymous - 2012-09-18

    Hi Campbell,

    I'll read the documentation carefully and try to switch to the db-scheme.

    Thanks a lot for your support.

    Joerg

     
  • Anonymous

    Anonymous - 2012-10-09

    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

     
  • Anonymous

    Anonymous - 2012-10-11

    Hi Campbell,
    Any change that the extra level will become a standard feature?
    Is there a new release planned anyway?

    Regards,
    Arjen