Forum Replies Created

Viewing 15 replies - 1 through 15 (of 25 total)
  • Thread Starter vikram0811

    (@vikram0811)

    Page B shortcode used

    [fileaway showto="administrator,google" type="table" paginate="true" pagesize="10" searchlabel="Search" datelabel="Date" theme="silver-bullet" heading="Software Package" hcolor="silver" directories="on" manager="on"]
    
    [fileaway directories=true sub="fa-usermeta(product_no)" showto="normal"]

    Directory Structure at wp-content/uploads/

    documents
    
    	Nexus 5
    		Datasheets
    			Some files
    		User Guide
    			Some more files
    
    	Nexus 6
    		Datasheets
    			Some files
    		User Guide
    			Some more files

    Accessing Datasheets Page, directories under eragon-files/ are viewed and not under documents.If I change base dir to wp-content/uploads/, it shows all the folders

    Am I still missing something here ?

    Thread Starter vikram0811

    (@vikram0811)

    Could you please guide on either workarounds ? What shortcode should I include or how do I modify the directory structure ?

    Thanks!

    Thread Starter vikram0811

    (@vikram0811)

    Current Base Dir 1 – wp-content/uploads/eragon-files

    Page A shortcode to restrict access based on product_no selection by user while registration

    [fileaway showto="administrator,google" type="table" paginate="true" pagesize="10" searchlabel="Search" datelabel="Date" theme="silver-bullet"
    heading="Software Package" hcolor="silver" directories="on" manager="on"]
    [fileup sub="Eragon 600" showto="administrator" makedir="true"]
    [fileup sub="Eragon 410" showto="administrator" makedir="true"]
    [fileaway sub="fa-usermeta(product_no)" showto="normal" type="table" paginate="true" pagesize="10" searchlabel="Search" datelabel="Date"
    theme="silver-bullet" heading="Software Package" hcolor="silver" directories="on"]
    google-files
    	Nexus 5
    		Some files
    	Nexus 6
    		Some files

    Here if user has selected product_no Nexus 5, then it can access only Nexus 5 directory and its files

    Page B existing shortcode where two files are listed for Nexus 5 and Nexus 6 but need to show based on product_no selection

    <strong>Nexus 6 Datasheets</strong>
    <a href="http://google.com/wp-content/uploads/Nexus_6.pdf">Download</a>
    
    <strong>Nexus 5 Datasheets</strong>
    <a href="http://google.com/wp-content/uploads/Nexus_5.pdf">Download</a>

    The directory structure for above could be something like below

    documents
    
    	Datasheets
    		Nexus 5
    			Some files
    		Nexus 6
    			Some more files
    
    	User Guide
    		Nexus 5
    			Some files
    		Nexus 6
    			Some more files

    When user click on Datasheets Page, he can only access those directory based on product_no selection. Same goes if he selects User Guide page.

    How do I achieve above ?

    Thread Starter vikram0811

    (@vikram0811)

    Agree on your above point. But if I use below code

    [fileaway sub="myfiles/Nexus 5"]
    [fileaway sub="somedirectory/datasheets"]

    user who is supposed to have access to only datasheets directory can also see Nexus 5 directory as all the directories will be listed together. Even if I set up as you instructed, if a user has value product_no = Nexus 5, he will be able to see Nexus 5 directory as well as Nexus 5 folder which is inside datasheets directory.

    How do I overcome this situation ?

    Thread Starter vikram0811

    (@vikram0811)

    Sir,

    I can add multiple base directories. But website has more than 5 pages where I would add base directories. What should be done in case where more than 5 directories are needed ?

    Thanks

    Thread Starter vikram0811

    (@vikram0811)

    I have three user roles defined.
    Administrator (upload files and folders)
    Google (can access both Nexus 5 and 6 directories)
    Normal (should access either directory based on option value selected)

    Kindly help as I am stuck with this issue for long and seek your guidance on how to make it work.

    Thanks.

    Thread Starter vikram0811

    (@vikram0811)

    As you said above I tried implementing below code. Also there is a brief overview on what is happening.

    While registration, user will select either of the value from dropdown. Option value is with space i.e. (Nexus 6)

    <select tabindex="10" class="form-control login-field" data-toggle="select" name="reg_product_no" id="reg-product-no" required>
      <option value="" disabled selected>Product Number</option>
      <option value="Nexus 6">Nexus 6</option>
      <option value="Nexus 5">Nexus 5</option>
    </select>

    Once registration is done, above value is stored as User Meta Data with name Product Number. Thus if Nexus 6 is selected from dropdown, prod number
    will be Nexus 6. Here user role will be ‘normal’.

    The shortcode I am using is as below. Files are already uploaded under folder Nexus 5 and Nexus 6.

    [fileaway showto="normal,administrator" type="table" paginate="true" pagesize="10" searchlabel="Search" datelabel="Date" theme="silver-bullet" heading="Software Package" hcolor="silver" directories="on"]
    [fileaway sub="fa-usemeta(product_no)" showto="normal" type="table" paginate="true" pagesize="10" searchlabel="Search" datelabel="Date" theme="silver-bullet" heading="Software Package" hcolor="silver"]
    [fileup sub="Nexus 6" showto="administrator" makedir="true" maxsize="500"]
    [fileup sub="Nexus 5" showto="administrator" makedir="true" maxsize="500"]

    If user with role ‘normal’ logs in and if value selected is Nexus 5 (no space), how do I show him Nexus 5 folder only and its relevant files and
    do not show Nexus 6 folders and files.

    I am still struggling to restrict folders based on user role and value selected.

    Thread Starter vikram0811

    (@vikram0811)

    Nexus5 will be the meta value while display in dropdown would be

    <select required="" id="reg-product-no" name="reg_product_no" data-toggle="select" class="form-control login-field" tabindex="10">
      <option selected="" disabled="" value="">Product Number</option>
      <option value="Nexus5">Nexus 5</option>
      <option value="Nexus6">Nexus 6</option>
    </select>
    Thread Starter vikram0811

    (@vikram0811)

    Directories are created using below code only. It shows me two directories/folders Nexus 5 and Nexus 6. Both contains few sample images uploaded.

    [fileaway  showto="employee,administrator" type="table" paginate="true" pagesize="10" searchlabel="Search" datelabel="Date" theme="silver-bullet" heading="Software Package" hcolor="silver" directories="on"]
    [fileaway sub="fa-usermeta(product_no)" showto="normal" type="table" paginate="true" pagesize="10" searchlabel="Search" datelabel="Date" theme="silver-bullet" heading="Software Package" hcolor="silver"]
    [fileup sub="Nexus 5" showto="administrator"  makedir="true" maxsize="500"]
    [fileup sub="Nexus 6" showto="administrator"  makedir="true" maxsize="500"]

    Also I have two users with me, one with role employee and another is normal. When I login as normal user with product_no = Nexus5, it shows me both folders Nexus 5 and Nexus 6

    Thread Starter vikram0811

    (@vikram0811)

    Yes sir, there are files added in the directories. showto="goog,face,normal" should be changed so it works for normal user with nexus5 or nexus6 product numbers

    Thread Starter vikram0811

    (@vikram0811)

    Considering above question, tried this one but its not working. Normal user can not see either of the directories.

    [fileaway  showto="employee,administrator" type="table" paginate="true" pagesize="10" searchlabel="Search" datelabel="Date" theme="silver-bullet" heading="Software Package" hcolor="silver" directories="on"]
    [fileaway sub="fa-usermeta(product_no)" showto="normal" type="table" paginate="true" pagesize="10" searchlabel="Search" datelabel="Date" theme="silver-bullet" heading="Software Package" hcolor="silver"]
    [fileup sub="Facebook" showto="administrator" makedir="true" maxsize="500"]
    [fileup sub="Google" showto="administrator"  makedir="true" maxsize="500"]

    Not sure what I am doing incorrect here.

    Thread Starter vikram0811

    (@vikram0811)

    The requisite is to have user role as Normal and based on either of selected option i.e. Facebook or Google, user will access relevant directory

    Thread Starter vikram0811

    (@vikram0811)

    @thomstark, user having email domain [email protected] or [email protected] will also select either options from dropdown. But they will be assigned same role say googface for both users i.e. facebook and google.

    General users like [email protected] will also either options, but their role would be normal.

    Now use having role googface can access each and every directories but user having role normal can access either of the directory(facebook/google) based upon their selection from dropdown.

    How the code [fileaway sub="fa-usermeta(googface)"] will work with below

    [fileaway type="table" paginate="true" pagesize="10" searchlabel="Search" datelabel="Date" theme="silver-bullet" heading="Software Package" hcolor="silver" directories="on"]
    [fileup sub="Facebook" showto="administrator" makedir="true" maxsize="500"]
    [fileup sub="Google" showto="administrator"  makedir="true" maxsize="500"]
    Thread Starter vikram0811

    (@vikram0811)

    Consider another case where user role is Normal and user will select either Facebook or Google as option from dropdown.

    After registration, the role will be Normal but saving user with a metadata i.e. face or goog

    Now, when such a user logs into system, how do I show him only that directory which is relevant to him. For ex: Normal role and selected option is Google, then he will see only Google directory

    Thread Starter vikram0811

    (@vikram0811)

    This is the code where I list down folders and when you click on any of it, it shows relevant files.

    [fileaway type=”table” paginate=”true” pagesize=”10″ searchlabel=”Search” datelabel=”Date” theme=”silver-bullet” heading=”Software Package” hcolor=”silver” directories=”on”]

    [fileup sub=”Facebook” showto=”administrator” makedir=”true” maxsize=”500″]

    [fileup sub=”Facebook” showto=”administrator” makedir=”true” maxsize=”500″]

    [fileup sub=”Google” showto=”administrator” makedir=”true” maxsize=”500″]

    [fileup sub=”Google” showto=”administrator” makedir=”true” maxsize=”500″]

    How do I modify above to create a Base Directory or a Sub directory as instructued and paths should be

    path/to/files/goog and path/to/files/face

Viewing 15 replies - 1 through 15 (of 25 total)