Merge pull request #7877 from nextcloud/deprecated-ocp-user

Deprecated checkLoggedIn and other old ways to access control
This commit is contained in:
Morris Jobke 2018-01-16 11:59:21 +01:00 committed by GitHub
commit 4ae04c3d63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,7 @@ namespace OCP;
* This class provides access to the user management. You can get information
* about the currently logged in user and the permissions for example
* @since 5.0.0
* @deprecated 13.0.0
*/
class User {
/**
@ -99,6 +100,7 @@ class User {
* Check if the user is logged in
* @return boolean
* @since 5.0.0
* @deprecated 13.0.0 Use annotation based ACLs from the AppFramework instead
*/
public static function isLoggedIn() {
return \OC::$server->getUserSession()->isLoggedIn();
@ -142,6 +144,7 @@ class User {
/**
* Check if the user is a admin, redirects to home if not
* @since 5.0.0
* @deprecated 13.0.0 Use annotation based ACLs from the AppFramework instead
*/
public static function checkAdminUser() {
\OC_Util::checkAdminUser();
@ -151,6 +154,7 @@ class User {
* Check if the user is logged in, redirects to home if not. With
* redirect URL parameter to the request URI.
* @since 5.0.0
* @deprecated 13.0.0 Use annotation based ACLs from the AppFramework instead
*/
public static function checkLoggedIn() {
\OC_Util::checkLoggedIn();