| 1 | Places where ICAT queried |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | #Within the frontend |
|---|
| 5 | |
|---|
| 6 | * \GitHub\autoreduce\WebApp\ISIS\autoreduce_webapp\autoreduce_webapp\icat_communication.py (Main, everything else calls it) |
|---|
| 7 | def get_owned_instruments(self, user_number): |
|---|
| 8 | logger.debug("Calling ICATCommunication.get_owned_instruments") |
|---|
| 9 | if not isinstance(user_number, (int, long)): |
|---|
| 10 | raise TypeError("User number must be a number") |
|---|
| 11 | |
|---|
| 12 | instruments = Set() |
|---|
| 13 | self._add_list_to_set(self.client.search("SELECT ins.instrument.fullName from InstrumentScientist ins WHERE ins.user.name = 'uows/" + str(user_number) + "'"), instruments) |
|---|
| 14 | return sorted(instruments) |
|---|
| 15 | |
|---|
| 16 | ''' |
|---|
| 17 | Checks if a user has any owned instruments and thus an instrument scientist |
|---|
| 18 | ''' |
|---|
| 19 | def is_instrument_scientist(self, user_number): |
|---|
| 20 | logger.debug("Calling ICATCommunication.is_instrument_scientist") |
|---|
| 21 | if self.get_owned_instruments(user_number): |
|---|
| 22 | return True |
|---|
| 23 | return False |
|---|
| 24 | |
|---|
| 25 | * \GitHub\autoreduce\WebApp\ISIS\autoreduce_webapp\autoreduce_webapp\settings.py (ICAT auth in settings) |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | Calling ICAT_Communication |
|---|
| 29 | * \GitHub\autoreduce\WebApp\ISIS\autoreduce_webapp\autoreduce_webapp\backends.py |
|---|
| 30 | |
|---|
| 31 | * \GitHub\autoreduce\WebApp\ISIS\autoreduce_webapp\autoreduce_webapp\queue_processor.py |
|---|
| 32 | |
|---|
| 33 | * \GitHub\autoreduce\WebApp\ISIS\autoreduce_webapp\autoreduce_webapp\tests.py |
|---|
| 34 | |
|---|
| 35 | * \GitHub\autoreduce\WebApp\ISIS\autoreduce_webapp\reduction_variables\tests.py |
|---|
| 36 | |
|---|
| 37 | * \GitHub\autoreduce\WebApp\ISIS\autoreduce_webapp\reduction_variables\views.py |
|---|
| 38 | |
|---|
| 39 | * \GitHub\autoreduce\WebApp\ISIS\autoreduce_webapp\reduction_viewer\models.py |
|---|
| 40 | |
|---|
| 41 | * \GitHub\autoreduce\WebApp\ISIS\autoreduce_webapp\reduction_viewer\views.py |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | |
|---|