• Resolved quickvfr

    (@quickvfr)


    Is it possible to use File-Away to log a user/group into a directory (this is how categories are defined) so that they have access to all children but no parent directories? For example, this is the directory structure and where clients would land when they log in:

    All Clients <– Administrative login access (me)
    Client 1 <– Client 1 admin login access (global client manager)
    Folder a <– Client 1a limited access (regional client manager)
    Folder x <– Client 1ax limited access (store manager)
    Files a
    Folder b <– Client 1b limited access (regional client manager)
    Files b
    Client 2 <– Client 2 admin login access (global client manager)
    Folder a <– Client 2a limited access (regional client manager)
    Files a
    Folder b <– Client 2b limited access (regional client manager)
    Folder x <– Client 2bx limited access (store manager)
    Files b
    Etc…

    We remove and re-populate the clients’ website directories from a network share with tens of thousands of updated files and directories once a month for each of our clients so dynamic population of the tree or whatever interface serves the files to our clients would be immediately available. I only need download access for my clients and the login directories names do not often change but everything below the login directory is in a constant state of flux (thus, the desired dynamic component). Any other suggestions are also welcomed! Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author thomstark

    (@thomstark)

    There are a couple ways to do this with File Away.

    1. If each different kind of group has a different user role, you could do it by showing different shortcodes to different user roles.

    2. Otherwise, if you can assign a custom user meta to each user, you can make the directory path dynamic based on the custom user meta.

    Say “All Clients” is your Base 1 directory.

    Option 1 Example:
    The “showto” attribute will look for the user role or a WP capability.

    [fileaway directories=”true” showto=”administrator”][fileaway directories=”true” sub=”Client 1″ showto=”client1_admin”][fileaway directories=”true” sub=”Client 1/Folder a” showto=”client1a”][fileaway directories=”true” sub=”Client 1/Folder a/Folder x” showto=”client1ax”][fileaway directories=”true” sub=”Client 1/Folder b” showto=”client1b”][fileaway directories=”true” sub=”Client 1/Folder b/Folder x” showto=”client1bx”][fileaway directories=”true” sub=”Client 2″ showto=”client2_admin”][fileaway directories=”true” sub=”Client 2/Folder a” showto=”client2a”][fileaway directories=”true” sub=”Client 2/Folder a/Folder x” showto=”client2ax”][fileaway directories=”true” sub=”Client 2/Folder b” showto=”client2b”][fileaway directories=”true” sub=”Client 2/Folder b/Folder x” showto=”client2bx”]

    etc.

    You don’t put spaces or line breaks in between the different shortcodes so that people who can’t see the first 7 shortcodes don’t see 7 blank lines on the page.

    Option 2 Example:

    For each user on the site, you will save a custom user meta under the name: “fileaway_permissions”. (You can name it whatever you want, “fileaway_permissions” is just an example.)

    For WP administrators, fileaway_permissions will be blank, i.e., “”
    Client 1 admins: fileaway_permissions will be “Client 1”
    Client 2 admins: fileaway_permissions will be “Client 2”
    Regional managers: fileaway_permissions will be “Client 1/Folder a”, “Client 2/Folder a”, etc.
    Store managers: fileaway_permissions will be “Client 1/Folder a/Folder x”, etc.

    Then your (single) shortcode would look like this:

    [fileaway directories=”true” sub=”fa-usermeta(fileaway_permissions)”]

    Plugin Author thomstark

    (@thomstark)

    But be aware that with option 2, if a particular user doesn’t have that user meta saved under the name “fileaway_permissions” (or whatever name you go with), they will see what you see (what the administrator sees).

    • This reply was modified 8 years, 2 months ago by thomstark.
    Thread Starter quickvfr

    (@quickvfr)

    Thank you very, very much! This gives me a place to start now that I know what I want to do is possible. Cheers! Pat Quick, Jacksonville, FL

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Log into a “directory structure”’ is closed to new replies.