non-admin users can't edit location field

Help
2009-01-30
2013-05-28
  • john_norvell

    john_norvell - 2009-01-30

    When I'm logged in as admin, I can put things in the location field AND have it append my email address. Non-admin users can't seem to do this. Why and how can I change it? Thanks!

     
    • Matthias Steffens

      Hi John,

      > When I'm logged in as admin, I can put things in the location field
      > AND have it append my email address. Non-admin users can't seem to
      > do this. Why and how can I change it? Thanks!

      I'm not sure I really understand what you're trying to achieve.

      It's true that the admin is allowed to mess with the 'location' field. However, messing around with the 'location' field is generally NOT a good idea (unless you know what you're doing). This is also the reason why editing of the 'location' field is not allowed for regular users. The internal logic of refbase depends on the (auto-generated) structure of the 'location' field, and things may break if this structure is hosed.

      Please explain in more detail what you're really trying to accomplish, and we may be able to help you better.

      Matthias

       
    • john_norvell

      john_norvell - 2009-01-30

      I want the put fields like "bookshelf", "mimeo", "e-archive," "web," "Honnold Library", etc. in the location field, places that I can find my actual copy of the text, if I own it. I understand that its predominate usage is for filtering by user library, but I thought I could include additional fields. (This is how I've used the location field in the large Endnote library I'm hoping to import at some point.)

      (And thanks for this great program, btw. I think it's fantastic.)

       
    • Matthias Steffens

      Hi John,

      > I want the put fields like "bookshelf", "mimeo", "e-archive," "web,"
      > "Honnold Library", etc. in the location field, places that I can
      > find my actual copy of the text, if I own it.

      This is meant to be put in the 'call_number' field. Just login as a regular user, and enter your identifier string (like "bookshelf", "mimeo", "e-archive", etc) into the 'call_number' field. Then make sure that "add" is selected in the "Location Field:" dropdown menu at the bottom of the edit form. refbase will take care of the structure of the 'location' and 'call_number' fields automatically.

      > I understand that its predominate usage is for filtering by user
      > library, but I thought I could include additional fields. (This is
      > how I've used the location field in the large Endnote library I'm
      > hoping to import at some point.)

      refbase imports the Endnote "Label" field (i.e. the "%F" field in the Endnote tagged text format) into the refbase 'call_number' field. If your location info is stored within another Endnote field, maybe you could use a batch search & replace action ("Change and Move Fields...") in Endnote to fix this...

      > (And thanks for this great program, btw. I think it's fantastic.)

      Thanks for the heads-up, I appreciate it!

      Best, Matthias

       
    • jay v

      jay v - 2009-06-24

      On the same lines as this user, i noticed that regular users can't edit the file field. Instead of uploading, we decided to dump all the attachments on a webserver so they could be accessed independent from refbase. but whenever a user adds a new record, they have to come to me in order to add the pdf link. anyway to make an exception for certain users?

      thanks in advance.

      jay

       
    • Matthias Steffens

      Hi jay,

      > Instead of uploading, we decided to dump all the attachments on
      > a webserver so they could be accessed independent from refbase.

      Couldn't you make your attachments directory the refbase upload directory? In other words, adjust variables '$filesBaseDir' and '$filesBaseURL' in file 'initialize/ini.inc.php' so that they point to your current attachments directory.

      Also, do your existing files have a particular (consistent) naming scheme? I.e., could the correct bibliographic record be determined from the PDF's file name? If so, it might be possible to batch update all existing records in your refbase database so that they include the link to the PDF in the 'file' field.

      > but whenever a user adds a new record, they have to come to me in
      > order to add the pdf link. anyway to make an exception for certain users?

      I'm not sure whether it's a good idea (for the official refbase release, at least) to allow regular users messing with the file links. That said, you can of course make the change yourself. To do so, open file 'record.php' and search for the following two lines (it's lines 144+145 in case of refbase-0.9.5):

      $fieldLock = " readonly"; // ... lock the 'location' & 'file' fields
      $fieldLockLabel = " (" . $loc["readonly"] . ")"; // ... append a " (readonly)" indicator to the field description of the 'location' & 'file' fields

      and replace them with these lines:

      $fieldLock = "";
      $fieldLockLabel = "";

      You could also replace the entire if/else block with the above two lines. In any case, this should allow regular users to edit the 'location' & 'file' fields.

      However, as mentioned above, I don't really think that this is a good idea. If you could merge the refbase upload directory and your current attachments directory (see above), that sounds like a better solution to me.

      Matthias

       
    • jay v

      jay v - 2009-06-24

      Thanks for the quick reply Matthias.

      I did think about merging the directories but to be honest, i was hesitant (lazy) to do it. i thought maybe there was an easier checkbox solution. i'll probably end up doing it anyway.

      again, thanks for the quick reply and keep up the great work.

      jay

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks