Skip to content

Commit e63a249

Browse files
committed
Merge commit '9a760bb' into 390-merge6
2 parents a0d619a + 9a760bb commit e63a249

File tree

27 files changed

+940
-74
lines changed

27 files changed

+940
-74
lines changed

administrator/components/com_actionlogs/access.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

administrator/components/com_actionlogs/config.xml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,4 @@
3131
default="com_banners,com_cache,com_categories,com_config,com_contact,com_content,com_installer,com_media,com_menus,com_messages,com_modules,com_newsfeeds,com_plugins,com_redirect,com_tags,com_templates,com_users"
3232
/>
3333
</fieldset>
34-
<fieldset
35-
name="permissions"
36-
label="JCONFIG_PERMISSIONS_LABEL"
37-
description="JCONFIG_PERMISSIONS_DESC"
38-
>
39-
<field
40-
name="rules"
41-
type="rules"
42-
label="JCONFIG_PERMISSIONS_LABEL"
43-
class="inputbox"
44-
validate="rules"
45-
filter="rules"
46-
component="com_actionlogs"
47-
section="component"
48-
/>
49-
</fieldset>
50-
</config>
34+
</config>

administrator/components/com_actionlogs/controller.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,6 @@ class ActionlogsController extends JControllerLegacy
2828
*/
2929
public function display($cachable = false, $urlparams = array())
3030
{
31-
$view = $this->input->get('view', 'actionlogs');
32-
33-
switch ($view)
34-
{
35-
case 'actionlogs':
36-
if (!JFactory::getUser()->authorise('core.viewlogs', 'com_actionlogs'))
37-
{
38-
throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403);
39-
}
40-
break;
41-
}
42-
4331
return parent::display();
4432
}
4533
}

administrator/components/com_actionlogs/controllers/actionlogs.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,6 @@ public function exportLogs()
110110
*/
111111
public function delete()
112112
{
113-
if (!JFactory::getUser()->authorise('core.delete', $this->option))
114-
{
115-
JError::raiseWarning(403, JText::_('JLIB_APPLICATION_ERROR_DELETE_NOT_PERMITTED'));
116-
117-
return;
118-
}
119-
120113
parent::delete();
121114
}
122115

administrator/components/com_actionlogs/views/actionlogs/view.html.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,19 +102,11 @@ protected function addToolbar()
102102
{
103103
JToolbarHelper::title(JText::_('COM_ACTIONLOGS_MANAGER_USERLOGS'));
104104

105-
if (JFactory::getUser()->authorise('core.delete', 'com_actionlogs'))
106-
{
107-
JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'actionlogs.delete');
108-
$bar = JToolbar::getInstance('toolbar');
109-
$bar->appendButton('Confirm', 'COM_ACTIONLOGS_PURGE_CONFIRM', 'delete', 'COM_ACTIONLOGS_TOOLBAR_PURGE', 'actionlogs.purge', false);
110-
}
111-
112-
if (JFactory::getUser()->authorise('core.admin', 'com_actionlogs') || JFactory::getUser()->authorise('core.options', 'com_actionlogs'))
113-
{
114-
JToolbarHelper::preferences('com_actionlogs');
115-
}
105+
JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'actionlogs.delete');
106+
$bar = JToolbar::getInstance('toolbar');
107+
$bar->appendButton('Confirm', 'COM_ACTIONLOGS_PURGE_CONFIRM', 'delete', 'COM_ACTIONLOGS_TOOLBAR_PURGE', 'actionlogs.purge', false);
108+
JToolbarHelper::preferences('com_actionlogs');
116109
JToolbarHelper::help('JHELP_COMPONENTS_ACTIONLOGS');
117-
118110
JToolBarHelper::custom('actionlogs.exportSelectedLogs', 'download', '', 'COM_ACTIONLOGS_EXPORT_CSV', true);
119111
JToolBarHelper::custom('actionlogs.exportLogs', 'download', '', 'COM_ACTIONLOGS_EXPORT_ALL_CSV', false);
120112
}

administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-24.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ CREATE TABLE IF NOT EXISTS `#__privacy_consents` (
77
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
88
`subject` varchar(25) NOT NULL DEFAULT '',
99
`body` text NOT NULL,
10+
`remind` tinyint(4) NOT NULL DEFAULT '0',
11+
`token` varchar(100) NOT NULL DEFAULT '',
1012
PRIMARY KEY (`id`),
1113
KEY `idx_user_id` (`user_id`)
12-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
14+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-24.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ CREATE TABLE "#__privacy_consents" (
1111
"created" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL,
1212
"subjext" varchar(255) DEFAULT '' NOT NULL,
1313
"body" text NOT NULL,
14+
"remind" smallint DEFAULT 0 NOT NULL,
15+
"token" varchar(100) DEFAULT '' NOT NULL,
1416
PRIMARY KEY ("id")
1517
);
1618
CREATE INDEX "#__privacy_consents_idx_user_id" ON "#__privacy_consents" ("user_id");
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?php
2+
/**
3+
* @package Joomla.Administrator
4+
* @subpackage com_privacy
5+
*
6+
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
7+
* @license GNU General Public License version 2 or later; see LICENSE.txt
8+
*/
9+
10+
defined('_JEXEC') or die;
11+
12+
/**
13+
* Table interface class for the #__privacy_consents table
14+
*
15+
* @property integer $id Item ID (primary key)
16+
* @property integer $remind The status of the reminder request
17+
* @property string $token Hashed token for the reminder request
18+
* @property integer $user_id User ID (pseudo foreign key to the #__users table) if the request is associated to a user account
19+
*
20+
* @since __DEPLOY_VERSION__
21+
*/
22+
class PrivacyTableConsent extends JTable
23+
{
24+
/**
25+
* The class constructor.
26+
*
27+
* @param JDatabaseDriver $db JDatabaseDriver connector object.
28+
*
29+
* @since __DEPLOY_VERSION__
30+
*/
31+
public function __construct(JDatabaseDriver $db)
32+
{
33+
parent::__construct('#__privacy_consents', 'id', $db);
34+
}
35+
36+
/**
37+
* Method to store a row in the database from the Table instance properties.
38+
*
39+
* @param boolean $updateNulls True to update fields even if they are null.
40+
*
41+
* @return boolean True on success.
42+
*
43+
* @since 11.1
44+
*/
45+
public function store($updateNulls = false)
46+
{
47+
$date = JFactory::getDate();
48+
49+
// Set default values for new records
50+
if (!$this->id)
51+
{
52+
if (!$this->remind)
53+
{
54+
$this->remind = '0';
55+
}
56+
57+
if (!$this->created)
58+
{
59+
$this->created = $date->toSql();
60+
}
61+
}
62+
63+
return parent::store($updateNulls);
64+
}
65+
}

administrator/components/com_privacy/views/requests/tmpl/default.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
<tbody>
8080
<?php foreach ($this->items as $i => $item) : ?>
8181
<?php
82-
$canView = $user->authorise('core.manage', 'com_privacy');
8382
$itemRequestedAt = new JDate($item->requested_at);
8483
?>
8584
<tr class="row<?php echo $i % 2; ?>">
@@ -98,13 +97,9 @@
9897
<?php echo JHtml::_('PrivacyHtml.helper.statusLabel', $item->status); ?>
9998
</td>
10099
<td>
101-
<?php if ($canView) : ?>
102-
<a class="hasTooltip" href="<?php echo JRoute::_('index.php?option=com_privacy&view=request&id=' . (int) $item->id); ?>" title="<?php echo JText::_('COM_PRIVACY_ACTION_VIEW'); ?>">
103-
<?php echo JStringPunycode::emailToUTF8($this->escape($item->email)); ?>
104-
</a>
105-
<?php else : ?>
100+
<a class="hasTooltip" href="<?php echo JRoute::_('index.php?option=com_privacy&view=request&id=' . (int) $item->id); ?>" title="<?php echo JText::_('COM_PRIVACY_ACTION_VIEW'); ?>">
106101
<?php echo JStringPunycode::emailToUTF8($this->escape($item->email)); ?>
107-
<?php endif; ?>
102+
</a>
108103
<?php if ($item->status == 1 && $urgentRequestDate >= $itemRequestedAt) : ?>
109104
<span class="label"><?php echo JText::_('COM_PRIVACY_BADGE_URGENT_REQUEST'); ?></span>
110105
<?php endif; ?>

administrator/language/en-GB/en-GB.com_privacy.sys.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ COM_PRIVACY_CONSENTS_VIEW_DEFAULT_DESC="Shows a list of user consents"
1111
COM_PRIVACY_CONSENTS_VIEW_DEFAULT_TITLE="Privacy: Consents"
1212
COM_PRIVACY_DASHBOARD_VIEW_DEFAULT_DESC="A dashboard related to the site's privacy settings and information requests."
1313
COM_PRIVACY_DASHBOARD_VIEW_DEFAULT_TITLE="Privacy: Dashboard"
14+
COM_PRIVACY_REMIND_VIEW_DEFAULT_DESC="Displays a form to extend the privacy consent"
15+
COM_PRIVACY_REMIND_VIEW_DEFAULT_TITLE="Extend Consent"
1416
COM_PRIVACY_REQUEST_VIEW_DEFAULT_DESC="Displays a form to submit an information request."
1517
COM_PRIVACY_REQUEST_VIEW_DEFAULT_OPTION="Default"
1618
COM_PRIVACY_REQUEST_VIEW_DEFAULT_TITLE="Create Request"

0 commit comments

Comments
 (0)