Small documentation faux pas in the man page

Issue #828 closed
Lutz Mader created an issue

Hello,
maybe I’m wrong, but I think “read-only“ does not fit (see the monit man page), but “readonly”.

read-only users

Finally it is possible to define some users as read-only. A read-only
user can read the Monit web pages but will not get access to push-
buttons and cannot change a service from the web interface.

  set httpd port 2812
      allow admin:password
      allow hauk:password read-only
      allow @admins
      allow @users read-only

A user is set to read-only by using the read-only keyword after
username:password. In the above example the user hauk is defined as a
read-only user, while the admin user has all access rights.

I find in the “p.y” file “readonly” only, but not “read-only”, and “readonly” works well.

allow           : ALLOW STRING':'STRING readonly {
                        addcredentials($2, $4, Digest_Cleartext, $<number>5);
                  }
                | ALLOW '@'STRING readonly {

Someone should correct the man page, the documentation to fit to the code.

With regards,
Lutz

Comments (4)

  1. Tildeslash repo owner

    It’s not bug.

    The “readonly” in the p.y parser is a macro:

    readonly : 
        
        | READONLY {
            $<number>$ = true;
    
        }
    ;
    

    The READONLY token is defined in the lexer (l.l) this way:

    read[-]?only      { return READONLY; }
    

    => both “readonly” and “read-only” will work

  2. Log in to comment