#17 Prevent Date Suffixes Repeating

Issue #732 resolved
Emil Reisser-Weston created an issue

Where a file has already been uploaded can you strip the suffix and place the new date suffix on it. this prevents really long file names as shown...

Capture.JPG

Comments (14)

  1. Lauris Mikulans

    Will also move files into private directory and request for file will go trough authentication. Now file URL can be accessed by anyone if only file URL is know.

    Revised logic will allow files to be accessed by trainees, assigned managers/admins.

  2. Emil Reisser-Weston reporter

    re: I can remove date suffixes altogether, are they needed at all?

    Yes can remove completely.

  3. Emil Reisser-Weston reporter

    re: Will also move files into private directory and request for file will go trough authentication. Now file URL can be accessed by anyone if only file URL is know.

    Revised logic will allow files to be accessed by trainees, assigned managers/admins.

    Good idea - will be good for security reports etc

  4. Lauris Mikulans

    Changes implemented.

    Date suffixes will be removed from files.
    Also, files are moved from public space to private space and when opening file authentication is performed, if user has access to resource/file, then fine. If user is not logged in, then there should be access denied response.

  5. Emil Reisser-Weston reporter

    Almost there - I'm pleased about this because I was going to raise it elsehere. Capture.JPG Whenever the 403 error occurs (in this case I have logged out) can you instead use the text ...

    "You do not have permission to access this page, you may have logged out or switched profile. Please log in correctly and try again."

    Once this is done please feel free to assign to me and set as resolved,.

    ...can you make this a little user friendly and instead say ..

  6. Emil Reisser-Weston reporter

    I went on to the create site and now we are getting Page not found warnings on trying to click on these links. Worried this fix is not backwardly compatible

    Capture.JPG

  7. Emil Reisser-Weston reporter
    • changed status to open

    See last comment.

    The new error message for "You do not have permission to access this page, you may have logged out or switched profile. Please log in correctly and try again." works fine

  8. Lauris Mikulans

    Technically, this fix should be 100% backwards compatible. My best guess is that these files were deleted off the disk, as this is create site some testing/functionality or plain deletion might be employed for whatever reason by developers(me). Create site is not on any back-up plan.

    When update was done to this public/private and suffix change. Loop was looking if file exists, then move file into private directory and rename these files and file name in database.

    If you see that suffix is present, then file was not found.

    Also, file was added more than year ago, long time.

  9. Log in to comment