How to prevent/prohibit a student user from accessing the ###import### feature?

How to prevent/prohibit a student user from accessing the ###import### feature?

Frankie Kam -
Atsakymų skaičius: 7
Plugin developers paveikslėlis

Hi Itamar

I created a CSV view to do importing and exporting. My question is: how do I hide/prohibit the student user from accessing the import feature?


I can't find a capability that allows be to prohibit an import....(?).


Here's what my CSV view looks like. I don't want to hide the ###import### pattern since it is useful for me, the admin, to do importing.


And since that pattern exists, ALL users can see that "Import" link. Itchy fingers leads to clicking on the link....so how do I stop my students from accessing that link?


Regards
Frankie Kam 

Pažymių vidurkis: -
Atsakymas į Frankie Kam

Re: How to prevent/prohibit a student user from accessing the ###import### feature?

Hartmut Scherer -

Hi Frankie,

You can have more than one view. Just copy the view "all users," name it "teacher's view" and set visibility of the "teacher's view" to disabled. Use the "teacher's view" for importing data and delete the ##import## in the view template of "all users" view. All other links will still be visible for all users.

With kind regards,

Hartmut

Atsakymas į Hartmut Scherer

Re: How to prevent/prohibit a student user from accessing the ###import### feature?

Frankie Kam -
Plugin developers paveikslėlis

Hi Hartmut. Genius! I never realized that was possible. Now it makes complete sense. Thank you.

Atsakymas į Hartmut Scherer

Re: How to prevent/prohibit a student user from accessing the ###import### feature?

Itamar Tzadok -

To prevent import in the users' view you should also disable the option in the view settings. See illustration. besišypsantis


Atsakymas į Itamar Tzadok

Re: How to prevent/prohibit a student user from accessing the ###import### feature?

Frankie Kam -
Plugin developers paveikslėlis

Hi Itamar

Strange. In my CSV view's settings, I tried unchecking the "Import' enable checkbox. Then I click "Save Changes". 


But when I access the settings again...


...I see that the checkbox has been ticked - as though I never unchecked it. 



Any idea why this is so?


Regards
Frankie Kam 

Atsakymas į Frankie Kam

Re: How to prevent/prohibit a student user from accessing the ###import### feature?

Itamar Tzadok -

This seems to be a bug. Please open a tracker issue for it. besišypsantis

Atsakymas į Itamar Tzadok

Re: How to prevent/prohibit a student user from accessing the ###import### feature?

Frankie Kam -
Plugin developers paveikslėlis

Hi Itamar

I've done some testing. Apparently, the settings take effect once I click the "Save Changes" button. If later I were click on the settings icon, both import and export checkboxes are shown as ticked. 

So I can:

(1) tick the Export checkbox, with the Import checkbox unticked

(2) tick the Import checkbox, with the Export checkbox unticked

(3) tick both the Export and Import checkboxes

(4) untick both the Export and Import checkboxs

and the settings will stick (apply) once I click the "save Changes". So yes, it is a bug as once I click on the View's settings icon, both checkboxes are shown as ticked - which is confusing. Opening a tracker issue.

Regards
Frankie Kam 



Atsakymas į Hartmut Scherer

Re: How to prevent/prohibit a student user from accessing the ###import### feature?

Frankie Kam -
Plugin developers paveikslėlis

Hi Hartmut

Done!


Works great. Thanks for the help.

Regards
Frankie Kam