Skip to content

Commit

Permalink
Reverting #3972 and implementing clearAccessRíghts to get a similar e…
Browse files Browse the repository at this point in the history
…ffect
  • Loading branch information
Hackwar committed Nov 4, 2014
1 parent 6ef7017 commit 3869016
Show file tree
Hide file tree
Showing 20 changed files with 25 additions and 578 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions administrator/language/en-GB/en-GB.lib_joomla.ini
Expand Up @@ -626,9 +626,6 @@ JLIB_RULES_SETTING_NOTES="1. If you change the setting, it will apply to this an
JLIB_RULES_SETTING_NOTES_ITEM="1. If you change the setting, it will apply to this item. Note that:<br /><em>Inherited</em> means that the permissions from global configuration, parent group and category will be used.<br /><em>Denied</em> means that no matter what the global configuration, parent group or category settings are, the group being edited cannot take this action on this item.<br /><em>Allowed</em> means that the group being edited will be able to take this action for this item (but if this is in conflict with the global configuration, parent group or category it will have no impact; a conflict will be indicated by <em>Not Allowed (Locked)</em> under Calculated Settings).<br />2. If you select a new setting, click <em>Save</em> to refresh the calculated settings."
JLIB_RULES_SETTINGS_DESC="Manage the permission settings for the user groups below. See notes at the bottom."

JLIB_SESSION_ERROR_INVALID_REMAINING_DATA="Unsupported session.serialize_handler: %s. Supported: php, php_binary"
JLIB_SESSION_ERROR_UNSUPPORTED_HANDLER="Invalid data, remaining: %s"

JLIB_UNKNOWN="Unknown"
JLIB_UPDATER_ERROR_COLLECTION_FOPEN="The PHP allow_url_fopen setting is disabled. This setting must be enabled for the updater to work."
JLIB_UPDATER_ERROR_COLLECTION_OPEN_URL="Update: :Collection: Could not open %s"
Expand Down
11 changes: 0 additions & 11 deletions administrator/language/en-GB/en-GB.plg_system_session.ini

This file was deleted.

7 changes: 0 additions & 7 deletions administrator/language/en-GB/en-GB.plg_system_session.sys.ini

This file was deleted.

14 changes: 0 additions & 14 deletions administrator/language/en-GB/en-GB.plg_user_session.ini

This file was deleted.

7 changes: 0 additions & 7 deletions administrator/language/en-GB/en-GB.plg_user_session.sys.ini

This file was deleted.

2 changes: 0 additions & 2 deletions installation/sql/mysql/joomla.sql
Expand Up @@ -610,8 +610,6 @@ INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`
(449, 'plg_authentication_cookie', 'plugin', 'cookie', 'authentication', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(450, 'plg_twofactorauth_yubikey', 'plugin', 'yubikey', 'twofactorauth', 0, 0, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(451, 'plg_search_tags', 'plugin', 'tags', 'search', 0, 1, 1, 0, '', '{"search_limit":"50","show_tagged_items":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(452, 'plg_system_session', 'plugin', 'session', 'system', 0, 1, 1, 1, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(453, 'plg_user_session', 'plugin', 'session', 'user', 0, 1, 1, 1, '', '{"session_update_flag_name":"refresh"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(503, 'beez3', 'template', 'beez3', '', 0, 1, 1, 0, '', '{"wrapperSmall":"53","wrapperLarge":"72","sitetitle":"","sitedescription":"","navposition":"center","templatecolor":"nature"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(504, 'hathor', 'template', 'hathor', '', 1, 1, 1, 0, '', '{"showSiteName":"0","colourChoice":"0","boldText":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(506, 'protostar', 'template', 'protostar', '', 0, 1, 1, 0, '', '{"templateColor":"","logoFile":"","googleFont":"1","googleFontName":"Open+Sans","fluidContainer":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
Expand Down
4 changes: 1 addition & 3 deletions installation/sql/postgresql/joomla.sql
Expand Up @@ -609,9 +609,7 @@ INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder"
(448, 'plg_twofactorauth_totp', 'plugin', 'totp', 'twofactorauth', 0, 0, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(449, 'plg_authentication_cookie', 'plugin', 'cookie', 'authentication', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(450, 'plg_twofactorauth_yubikey', 'plugin', 'yubikey', 'twofactorauth', 0, 0, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(451, 'plg_search_tags', 'plugin', 'tags', 'search', 0, 1, 1, 0, '', '{"search_limit":"50","show_tagged_items":"1"}', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(452, 'plg_system_session', 'plugin', 'session', 'system', 0, 1, 1, 1, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(453, 'plg_user_session', 'plugin', 'session', 'user', 0, 1, 1, 1, '', '{"session_update_flag_name":"refresh"}', '', '', 0, '1970-01-01 00:00:00', 0, 0);
(451, 'plg_search_tags', 'plugin', 'tags', 'search', 0, 1, 1, 0, '', '{"search_limit":"50","show_tagged_items":"1"}', '', '', 0, '1970-01-01 00:00:00', 0, 0);

-- Templates
INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") VALUES
Expand Down
6 changes: 1 addition & 5 deletions installation/sql/sqlazure/joomla.sql
Expand Up @@ -1011,11 +1011,7 @@ SELECT 449, 'plg_authentication_cookie', 'plugin', 'cookie', 'authentication', 0
UNION ALL
SELECT 450, 'plg_twofactorauth_yubikey', 'plugin', 'yubikey', 'twofactorauth', 0, 0, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0
UNION ALL
SELECT 451, 'plg_search_tags', 'plugin', 'tags', 'search', 0, 1, 1, 0, '', '{"search_limit":"50","show_tagged_items":"1"}', '', '', 0, '1900-01-01 00:00:00', 0, 0
UNION ALL
SELECT 452, 'plg_system_session', 'plugin', 'session', 'system', 0, 1, 1, 1, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0
UNION ALL
SELECT 453, 'plg_user_session', 'plugin', 'session', 'user', 0, 1, 1, 1, '', '{"session_update_flag_name":"refresh"}', '', '', 0, '1900-01-01 00:00:00', 0, 0;
SELECT 451, 'plg_search_tags', 'plugin', 'tags', 'search', 0, 1, 1, 0, '', '{"search_limit":"50","show_tagged_items":"1"}', '', '', 0, '1900-01-01 00:00:00', 0, 0;


INSERT [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state])
Expand Down
3 changes: 0 additions & 3 deletions language/en-GB/en-GB.lib_joomla.ini
Expand Up @@ -626,9 +626,6 @@ JLIB_RULES_SETTING_NOTES="1. If you change the setting, it will apply to this an
JLIB_RULES_SETTING_NOTES_ITEM="1. If you change the setting, it will apply to this item. Note that:<br /><em>Inherited</em> means that the permissions from global configuration, parent group and category will be used.<br /><em>Denied</em> means that no matter what the global configuration, parent group or category settings are, the group being edited cannot take this action on this item.<br /><em>Allowed</em> means that the group being edited will be able to take this action for this item (but if this is in conflict with the global configuration, parent group or category it will have no impact; a conflict will be indicated by <em>Not Allowed (Locked)</em> under Calculated Settings).<br />2. If you select a new setting, click <em>Save</em> to refresh the calculated settings."
JLIB_RULES_SETTINGS_DESC="Manage the permission settings for the user groups below. See notes at the bottom."

JLIB_SESSION_ERROR_INVALID_REMAINING_DATA="Unsupported session.serialize_handler: %s. Supported: php, php_binary"
JLIB_SESSION_ERROR_UNSUPPORTED_HANDLER="Invalid data, remaining: %s"

JLIB_UNKNOWN="Unknown"
JLIB_UPDATER_ERROR_COLLECTION_FOPEN="The PHP allow_url_fopen setting is disabled. This setting must be enabled for the updater to work."
JLIB_UPDATER_ERROR_COLLECTION_OPEN_URL="Update: :Collection: Could not open %s"
Expand Down
116 changes: 0 additions & 116 deletions libraries/joomla/session/helper.php

This file was deleted.

33 changes: 23 additions & 10 deletions libraries/joomla/user/user.php
Expand Up @@ -448,11 +448,10 @@ public function getAuthorisedViewLevels()
$this->_authLevels = array();
}

/*
* Force loading the latest state.
* Otherwise updating the user session fails because it sticks with the 'old' values.
*/
$this->_authLevels = JAccess::getAuthorisedViewLevels($this->id);
if (empty($this->_authLevels))
{
$this->_authLevels = JAccess::getAuthorisedViewLevels($this->id);
}

return $this->_authLevels;
}
Expand All @@ -471,15 +470,29 @@ public function getAuthorisedGroups()
$this->_authGroups = array();
}

/*
* Force loading the latest state.
* Otherwise updating the user session fails because it sticks with the 'old' values.
*/
$this->_authGroups = JAccess::getGroupsByUser($this->id);
if (empty($this->_authGroups))
{
$this->_authGroups = JAccess::getGroupsByUser($this->id);
}

return $this->_authGroups;
}

/**
* Clears the access rights cache of this user
*
* @return void
*
* @since 3.4.0
*/
public function clearAccessRíghts()
{
$this->_authLevels = null;
$this->_authGroups = null;
$this->isRoot = null;
JAccess::clearStatics();
}

/**
* Pass through method to the table for setting the last visit date
*
Expand Down
1 change: 0 additions & 1 deletion plugins/system/session/index.html

This file was deleted.

0 comments on commit 3869016

Please sign in to comment.