136 Commits

Author SHA1 Message Date
David Mudrák
596b0bb23e MDL-67748 admin: Improve the display of missing capabilities
The patch improves the display of the missing capabilities on the Manage
tokens page and the Select authorised users page. The list of
capabilities is rendered in a collapsible area and does not occupy too
much space by default.

Additionally on the later page, the patch improves the display of the
list of existing authorised users so that it respects the configured
identity fields.
2021-03-15 21:24:06 +01:00
David Mudrák
c07f15d791 MDL-67748 admin: Improve get_missing_capabilities_by_users()
The previous implementation falsely reported all implicit capabilities
inherited from the authenticated user archetype. That caused a lot of
capabilities reported as missing, even if they were correctly granted.

This new implementation uses a different logic. Instead of seeking for
explicitly assigned capabilities, it searches for capabilities that are
not assigned to any of the user's role across the system.

Please refer to the inline documentation. This should be still used for
informative reports only, not for actual permissions evaluation. The
context has been ignored here, as well as all the overrides etc. This
patch just makes it a lesser evil.
2021-03-15 21:24:06 +01:00
David Mudrák
2bf6db2d5a MDL-67748 admin: Move the web services under the server administration
I suppose the original reasoning was that the web services protocols are
pluggable and that plugins can provide external function. But those are
not good reasons to put the whole Web services section under plugins.
Web services are not a plugin type and they always felt very
counter-intuitive there.

From the server administrtaion perspective, web services are similar to
scheduled tasks and therefore, they should live in the same section.
2021-03-15 21:21:43 +01:00
Juan Leyva
d2aa3e054f MDL-69283 webservice: New external setting for forcing timezone 2020-09-25 19:08:59 +02:00
Dani Palou
956232db1d MDL-67749 ws: Set private token when reset or manual create token 2020-02-19 12:03:48 +01:00
Pau Ferrer Ocaña
4ed6010a61 MDL-54799 webservice: Handle exception in WS format ASAP 2019-11-29 09:44:09 +01:00
sam marshall
bb044f5394 MDL-65179 Web service: Token last access is updated too frequently 2019-03-28 17:11:33 +00:00
sam marshall
b5311ce466 MDL-63131 Web services: Callback to allow web service overrides 2018-08-20 15:32:34 +01:00
Juan Leyva
bb14a48851 MDL-60736 tool_mobile: Support session lang in WS 2018-03-21 17:27:33 +01:00
Marina Glancy
e25ccd58c1 MDL-59992 webservice: fix debugging message event context already set 2017-08-31 12:13:15 +08:00
John Okely
ad2ae6e3db MDL-28574 webservices: Add new capability for managing all tokens 2017-07-31 09:55:04 +08:00
Jan Dageförde
0c62ca2563 MDL-28574 webservice: Allow admins to manage tokens created by others.
Until now, admins could only modify (or even see) tokens they have
created themselves. Tokens created by other users or even other admins
were invisible unless you were looking into the database. In case there
are former admins, their successors can be unable to inspect or delete
existing tokens.
2017-07-31 09:54:33 +08:00
Juan Leyva
1f2e3279b2 MDL-56765 webservice: On new session is started unset old preferences 2016-11-04 19:33:31 +00:00
Juan Leyva
69cbe35943 MDL-45639 webservice: Support private tokens
Private tokens are generated at the same time that the token.
They must be stored safely by the ws client, and they must be transmitted only via  https.
2016-10-14 12:32:30 +01:00
Juan Leyva
9d382a948e MDL-55923 webservice: Allow user to sign-out systems on pwd change 2016-10-05 20:34:06 +01:00
Matt Davidson
59c66f926f MDL-55791 admin: maintenance mode access capability
Add capability to allow certain non-admin users through maintenance
mode.
2016-09-12 10:37:25 -04:00
Juan Leyva
753504fbe0 MDL-49026 webservice: Remove tokens on password change 2016-09-07 09:07:29 +08:00
Juan Leyva
89823b1ae3 MDL-54601 webservice: Order services function list by name 2016-06-15 15:40:55 +01:00
Cameron Ball
f23e9b6ba4 MDL-49414 webservices: Remove deprecated functions 2016-04-27 15:54:38 +08:00
Damyon Wiese
11c16f5fc8 MDL-53772 externallib: Deprecate external_function_info() 2016-04-14 15:07:41 +08:00
Cameron Ball
b5e6ec4486 MDL-52207 libraries: Delete Zend framework
Let it RIP.
2016-03-21 11:02:55 +08:00
Jun Pataleta
79c7fffce3 MDL-52208 webservice_soap: Remove Zend from webservice_soap 2016-02-16 14:14:11 +08:00
Cameron Ball
13ae7db2bb MDL-52210 webservices: Remove AMF webservice 2016-01-05 10:36:26 +08:00
Marina Glancy
bd132709c4 MDL-46054 web_services: wrong key in exception string 2014-09-29 16:03:22 +02:00
Marina Glancy
0880a52c9a Merge branch 'MDL-40050-master' of git://github.com/FMCorz/moodle 2013-10-02 16:54:59 +10:00
Frederic Massart
ee2df1a8b2 MDL-40050 webservice: Remove token from events 2013-10-02 13:00:28 +08:00
Eloy Lafuente (stronk7)
94211c02c3 Merge branch 'MDL-40050-master' of git://github.com/FMCorz/moodle 2013-09-30 21:55:41 +02:00
Frederic Massart
d733a8ccc3 MDL-40050 webservice: Replace add_to_log() with new events 2013-09-24 15:20:18 +08:00
Petr Škoda
d79d5ac276 MDL-31501 rework user session architecture
List of changes:
 * New OOP API using PHP namespace \core\session\.
 * All handlers now update the sessions table consistently.
 * Experimental DB session support in Oracle.
 * Full support for session file handler (filesystem locking required).
 * New option for alternative session directory.
 * Official memcached session handler support.
 * Workaround for memcached version with non-functional gc.
 * Improved security - forced session id regeneration.
 * Improved compatibility with recent PHP releases.
 * Fixed borked CSS during install in debug mode.
 * Switched to file based sessions in new installs.
 * DB session setting disappears if DB does not support sessions.
 * DB session setting disappears if session handler specified in config.php.
 * Fast purging of sessions used in request only.
 * No legacy distinction -  file, database and memcached support the same functionality.
 * Session handler name included in performance info.
 * Fixed user_loggedin and user_loggedout event triggering.
 * Other minor bugfixing and improvements.
 * Fixed database session segfault if MUC disposed before $DB.

Limitations:
 * Session access time is now updated right after session start.
 * Support for $CFG->sessionlockloggedinonly was removed.
 * First request does not update userid in sessions table.
 * The timeouts may break badly if server hosting forces PHP.ini session settings.
 * The session GC is a lot slower, we do not rely on external session timeouts.
 * There cannot be any hooks triggered at the session write time.
 * File and memcached handlers do not support session lock acquire timeouts.
 * Some low level PHP session functions can not be used directly in Moodle code.
2013-09-21 13:11:56 +02:00
Jerome Mouneyrac
ca11d39029 MDL-31209 web service error message: Indication about the service not containg the web service function is confusing 2013-05-14 15:40:16 +08:00
Frederic Massart
4d3fd60d28 MDL-37961 webservice: PARAM_BOOL with PARAM_DEFAULT accepts boolean default 2013-02-11 14:37:19 +08:00
Jerome Mouneyrac
12fc8acf5b MDL-35198 replace key_exists by array_key_exists 2012-09-26 15:20:18 +08:00
Ankit Agarwal
d197ea4300 MDL-34549 libraries: Replace get_context_instance_by_id() by context::instance_by_id() 2012-08-24 11:30:10 +08:00
Petr Škoda
4c7f536379 MDL-34368 fix another validuntil condition 2012-08-01 08:30:28 +02:00
Nathan Mares
6bfa9c49d5 MDL-34368: Fix broken query in so tokens are correctly checked against the linked service 2012-07-30 15:49:38 +08:00
Frederic Massart
4373103084 MDL-34460 Librairies: Replaced deprecated get_context_instance() 2012-07-26 13:23:28 +08:00
Jerome Mouneyrac
93ce0e8296 MDL-32581 support additional format field with all text field in extrnal lib function + new possible ws params to decide how format is returned (which are stored in a singleton) 2012-05-31 12:31:27 +08:00
Jerome Mouneyrac
96d3b93ba3 MDL-33060 remove some get_string from exceptions 2012-05-18 14:45:15 +08:00
Jerome Mouneyrac
b449d3b7a2 MDL-30225 add some phpdoc mentioning to avoid to use broken get_user_capabilities ws lib function 2012-04-18 14:03:54 +08:00
Jerome Mouneyrac
fbf6cfe6fc MDL-30225 Creating new web service tokens create error 2012-04-17 18:08:55 +08:00
Petr Skoda
caee6e6c26 MDL-32251 E_STRICT fixes part 3 2012-03-29 15:24:30 +02:00
Jerome Mouneyrac
a0a07014c2 MDL-30994 webservice API, check and update DocBlock 2012-03-02 09:49:41 +08:00
Jerome Mouneyrac
dcd902a0f6 MDL-30495 HTML5 apps cannot call Webservices functions if a HTTP resource is retrieved from the Moodle installation 2012-02-15 11:33:11 +08:00
Jerome Mouneyrac
07cc3d11e2 MDL-28646 add missing authentication web service checks. Merge download/upload script checks in the same lib functions. Make the download scrit return json error message. Add missing webservice lang. Minor unit test doc improvement. 2011-11-29 11:18:36 +08:00
Sam Hemelryk
b28de4b412 Merge branch 'MDL-28629' of git://github.com/mouneyrac/moodle 2011-11-22 18:26:35 +13:00
Jerome Mouneyrac
07a90ec313 MDL-28629 more checks during web service authentication 2011-11-11 15:07:18 +08:00
Aparup Banerjee
e88c193fb0 MDL-28670 webservice : added dimming of service name in security keys page if webservice is disabled or not on authorised list to access webservice. 2011-11-07 14:21:40 +08:00
Jerome Mouneyrac
729ca37388 MDL-29825 better debug info when a ws client user misses a protocol capability 2011-10-21 15:11:38 +08:00
Petr Skoda
e922fe23b6 MDL-29602 accesslib improvements
Refactoring and improvements of the accesslib.php library including prevention of access for not-logged-in users when forcelogin enabled, improved context caching, OOP refactoring of contexts, fixed context loading, deduplication of role definitions in user sessions, installation improvements, decoupling of enrolment checking from capability loading, added detection of deleted and non-existent users in has_capability(), new function accesslib test, auth and enrol upgrade notes.

More details are available in tracker subtasks.
2011-10-16 14:05:18 +02:00
Jerome Mouneyrac
ccda013458 MDL-26635 Return a more explicit debuginfo message when the user can not access the web service function 2011-09-21 13:03:18 +08:00