152 Commits

Author SHA1 Message Date
Jun Pataleta
154774c061
MDL-80119 webservice: Fix typo for generated webservices_* classes 2024-01-23 14:17:22 +08:00
Andrew Nicols
53416b1c1e
MDL-80119 core: Address issues with saner inc/dec operators 2023-11-15 09:16:13 +08:00
Paul Holden
ad06206508
MDL-78503 webservice: include token last access time in reports. 2023-07-18 09:19:24 +01:00
Paul Holden
686b054b78
MDL-78637 webservice: display token info after user performs reset. 2023-07-03 14:26:38 +01:00
meirzamoodle
f69a420be1 MDL-76656 webservice: generated token can only read once
Generated tokens should only read once.
Therefore removing the token column at the table view of the manage tokens page and the user's page.
The token should not be able to search.
2023-06-28 09:27:31 +07:00
Meirza
4fbb4f552f MDL-77350 webservice: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-16 00:33:19 +07:00
Mathew May
e5ca7766e7 MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Paul Holden
f8ef28f9a6 MDL-76284 webservice: early exit if no users for missing capabilities. 2022-11-28 11:52:45 +00:00
Eloy Lafuente (stronk7)
df227f3819 MDL-76052 webservice_xmlrpc: Remove it completely from core
Normal removal procedure:
  - Remove the plugin completely from core.
  - Document it in the webservices upgrade.txt file.
  - Add a core upgrade step to proceed to remove any configuration
    if the plugin has not been re-installed manually.

Plus:
  - Remove a few remaining uses in the hub/sites registration scripts,
    that were moved from xmlrpc to hand.made rest calls by MDL-31436
    (Moodle 3.4.1 and up) and never removed then.
  - Remove the php-xmlrpc extension as a recommendation in composer.
  - Remove "xmlrpc" from various comments, trivial cleanup.

Note:
  - While working on this MDL-76078 has been created about to
    fix a serious design problem detected (it does not affect
    functionality). That's out from this issue scope.
2022-11-04 16:49:52 +01:00
Dmitrii Metelkin
a6cad23b1a MDL-73431 enrol: Introduce a sync interval 2022-05-30 15:58:22 +10:00
Paul Holden
17dd5bbae0 MDL-74202 webservice: fix protocol type in exception message. 2022-03-25 09:53:23 +00:00
Paul Holden
ef871e28b5 MDL-73575 webservice: ensure configured protocols are non-empty. 2022-01-13 12:21:29 +00:00
Juan Leyva
a5c48fe780 MDL-67804 webservice: Fix exception class to allow clients treat errors 2021-11-23 16:59:21 +01:00
Paul Holden
797cff78d5 MDL-72464 webservice: fix detection of non-expiring external tokens. 2021-10-10 20:40:14 +01:00
sam marshall
611e2569aa MDL-71215 core_user: User fields - remaining deprecated functions
This change removes references in code and comments to a few
deprecated functions that were accidentally missed in the larger
change.

The code changes only affect service_users.php. I made it support
custom user profile fields in this query, because it was easy
enough, rather than adding another TODO to fix later.
2021-03-31 11:12:16 +01:00
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