Spade
Mini Shell
| Directory:~$ /home/lmsyaran/public_html/joomla4/ |
| [Home] [System Details] [Kill Me] |
fields/index.html000064400000000054151162251320010004
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>index.html000064400000000054151162251320006536
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>language/en-GB/en-GB.plg_system_module_permission.ini000064400000001214151162251320016606
0ustar00PLG_SYSTEM_MODULE_PERMISSION="System - Module_permission"
PLG_SYSTEM_MODULE_PERMISSION_DESCRIPTION="module_permission"
PLG_SYSTEM_MODULE_PERMISSION_XML_DESCRIPTION="<h1>System -
Module_permission (v.1.0.0)</h1> <div style='clear:
both;'></div><p>module_permission</p><p>Created
by <a href='http://Lmskaran.com'
target='_blank'>Lmskaran</a><br
/><small>Development started 24th July,
2022</small></p>"
PLG_SYSTEM_MODULE_PERMISSION_USER_MODULE_LABEL="user module map"
PLG_SYSTEM_MODULE_PERMISSION_USER_LABEL="User"
PLG_SYSTEM_MODULE_PERMISSION_MODULE_ID_LABEL="module id"
PLG_SYSTEM_MODULE_PERMISSION_MODULE_ID_MESSAGE="Error! Please add some
text
here."language/en-GB/en-GB.plg_system_module_permission.sys.ini000064400000001214151162251320017423
0ustar00PLG_SYSTEM_MODULE_PERMISSION="System - Module_permission"
PLG_SYSTEM_MODULE_PERMISSION_DESCRIPTION="module_permission"
PLG_SYSTEM_MODULE_PERMISSION_XML_DESCRIPTION="<h1>System -
Module_permission (v.1.0.0)</h1> <div style='clear:
both;'></div><p>module_permission</p><p>Created
by <a href='http://Lmskaran.com'
target='_blank'>Lmskaran</a><br
/><small>Development started 24th July,
2022</small></p>"
PLG_SYSTEM_MODULE_PERMISSION_USER_MODULE_LABEL="user module map"
PLG_SYSTEM_MODULE_PERMISSION_USER_LABEL="User"
PLG_SYSTEM_MODULE_PERMISSION_MODULE_ID_LABEL="module id"
PLG_SYSTEM_MODULE_PERMISSION_MODULE_ID_MESSAGE="Error! Please add some
text
here."language/en-GB/index.html000064400000000054151162251320011211
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>language/index.html000064400000000054151162251320010321
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>module_permission.php000064400000005300151162251320011006
0ustar00q<?php
/*----------------------------------------------------------------------------------|
www.vdm.io |----/
Lmskaran
/-------------------------------------------------------------------------------------------------------/
@version 1.0.77
@build 24th July, 2022
@created 22nd July, 2020
@package Moojla
@subpackage module_permission.php
@author Lmskaran <http://Lmskaran.com>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____
_____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \(
_ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/
)(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__)
(_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/***[JCBGUI.class_extends.head.1.$$$$]***/
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Plugin\CMSPlugin;
/***[/JCBGUI$$$$]***/
/***[JCBGUI.class_extends.comment.1.$$$$]***/
/**
* System - Module_permission plugin.
*
* @package Module_permission
* @since 1.0.0
*//***[/JCBGUI$$$$]***/
class PlgSystemModule_permission extends CMSPlugin
{
/***[JCBGUI.joomla_plugin.main_class_code.61.$$$$]***/
public function __construct(&$subject, $config = array())
{
$this->gApp = JFactory::getApplication();
parent::__construct($subject, $config);
}
public function onContentPrepareData($context, $data)
{
if ($context != 'com_modules.module')
return true;
$result= $this->authorize_user($data->id);
if (!$result)
{
$app = JFactory::getApplication();
$message = JText::_('JGLOBAL_AUTH_ACCESS_DENIED');
$app->redirect(JRoute::_('index.php?option=com_modules&view=modules',
false), $message, 'error');
}
return true;
}
public function authorize_user($module_id)
{
$module_id;
$user= JFactory::getUser();
$userid= $user->get('id', 0);
if ($user->gid== 8)
return true;
foreach ((array)$this->params->get('user_module')
as $item) {
if ($item->user== $userid && $item->module_id==
$module_id)
return true;
}
return false;
}
/***[/JCBGUI$$$$]***/
}
module_permission.xml000064400000005535151162251320011031 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<extension type="plugin" version="3.8"
group="system" method="upgrade">
<name>PLG_SYSTEM_MODULE_PERMISSION</name>
<creationDate>24th July, 2022</creationDate>
<author>Lmskaran</author>
<authorEmail>info@Lmskaran.com</authorEmail>
<authorUrl>http://Lmskaran.com</authorUrl>
<copyright>Copyright (C) 2015. All Rights Reserved</copyright>
<license>GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html</license>
<version>1.0.0</version>
<description>PLG_SYSTEM_MODULE_PERMISSION_XML_DESCRIPTION</description>
<!-- Language files -->
<languages folder="language">
<language
tag="en-GB">en-GB/en-GB.plg_system_module_permission.ini</language>
<language
tag="en-GB">en-GB/en-GB.plg_system_module_permission.sys.ini</language>
</languages>
<!-- Plugin files -->
<files>
<filename
plugin="module_permission">module_permission.php</filename>
<filename>index.html</filename>
<folder>language</folder>
<folder>fields</folder>
<folder>rules</folder>
</files>
<!-- Config parameter -->
<config>
<fields name="params">
<!-- default paths of basic fieldset points to the plugin -->
<fieldset name="basic" label="basic"
addrulepath="/plugins/system/module_permission/rules"
addfieldpath="/plugins/system/module_permission/fields"
>
<!-- User_module Field. Type: Subform. (joomla) -->
<field type="subform"
name="user_module"
label="PLG_SYSTEM_MODULE_PERMISSION_USER_MODULE_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
buttons="add,remove,move"
default=""
icon="list"
max="50">
<form hidden="true"
name="list_user_module_modal"
repeat="true">
<!-- User Field. Type: User. (joomla)-->
<field type="user"
name="user"
label="PLG_SYSTEM_MODULE_PERMISSION_USER_LABEL" />
<!-- Module_id Field. Type: Text. (joomla)-->
<field type="text"
name="module_id"
label="PLG_SYSTEM_MODULE_PERMISSION_MODULE_ID_LABEL"
size="10"
maxlength="50"
default=""
class="text_area"
readonly="false"
disabled="false"
required="false"
filter="INT"
message="PLG_SYSTEM_MODULE_PERMISSION_MODULE_ID_MESSAGE"
autocomplete="on" />
</form>
</field>
</fieldset>
</fields>
</config>
</extension>rules/index.html000064400000000054151162251320007670
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>