Cannot alter the content of "File"-field

Help
2005-06-06
2013-05-28
  • Hi!

    First of all I have to say that this is a great software!

    BUT :-)
    I cannot alter the content of the "File"-field if I am logged in as a normal user (with all priveledges). When I'm logged in as Admin I can do everything. Is there a way to change this default (?) option, so that every loggin-in-user can change the File-field?

    Thank's in advance!
    Axel

     
    • Hi Axel,

      > I cannot alter the content of the "File"-field if I am logged
      > in as a normal user (with all priveledges). When I'm logged in
      > as Admin I can do everything.

      Yes, this is a feature ;-) and, IMHO, a good thing in a multi-user environment. I agree that this may be unconvenient if you're the only one using the database, though.

      > Is there a way to change this default (?) option, so that
      > every loggin-in-user can change the File-field?

      Not as of refbase-0.8.0, unfortunately. But I've noted it as a feature request and we may include it as user permission in a future release. Thanks for the suggestion!

      As a preliminary solution, you could hack the file 'record.php' and change line 121 from this:

      if ((!isset($loginEmail)) OR ((isset($loginEmail)) AND ($loginEmail != $adminLoginEmail)))

      to this:

      if (!isset($loginEmail))

      That will allow every user who is logged in to edit the file field but lock the field for anyone who isn't logged in.

      Regards, Matthias

       
    • Of course it is feature. But it would be nice as an admin to disable it.

      By the way:
      I had to put another ")" behind "if ((!isset($loginEmail))"
      But thank you so much for really fast reply!!!

      regards,
      Axel

       
      • Hi Axel,

        > Of course it is feature. But it would be nice as an admin
        > to disable it.

        Yes, I fully agree with you and we should make this optional in a future version of refbase.

        > I had to put another ")" behind "if ((!isset($loginEmail))"
        > But thank you so much for really fast reply!!!

        That's correct if you're keeping the *two* opening parentheses as in the original code. But (as in my example) you can safely skip one set of enclosing parentheses:

        if (!isset($loginEmail))

        Best regards, Matthias