Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
9205427c
Commit
9205427c
authored
Nov 23, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system: simplify ACL translation for #1037
parent
7526194b
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
178 additions
and
327 deletions
+178
-327
ACL.php
src/opnsense/mvc/app/models/OPNsense/Core/ACL.php
+2
-6
ACL.xml
src/opnsense/mvc/app/models/OPNsense/Core/ACL/ACL.xml
+158
-316
system_usermanager.php
src/www/system_usermanager.php
+18
-5
No files found.
src/opnsense/mvc/app/models/OPNsense/Core/ACL.php
View file @
9205427c
...
...
@@ -100,10 +100,6 @@ class ACL
if
(
isset
(
$ACLnode
->
name
))
{
$aclPayload
=
array
();
$aclPayload
[
'name'
]
=
(
string
)
$ACLnode
->
name
;
if
(
isset
(
$ACLnode
->
description
))
{
// rename internal tag for backward compat.
$aclPayload
[
'descr'
]
=
(
string
)
$ACLnode
->
description
;
}
if
(
isset
(
$ACLnode
->
patterns
->
pattern
))
{
// rename pattern to match for internal usage, old code did use match and
// to avoid duplicate conversion let's do this only on input.
...
...
@@ -254,8 +250,8 @@ class ACL
foreach
(
$this
->
ACLtags
as
$aclKey
=>
$aclItem
)
{
$priv_list
[
$aclKey
]
=
array
();
foreach
(
$aclItem
as
$propName
=>
$propValue
)
{
if
(
$propName
==
'name'
||
$propName
==
'descr'
)
{
// translate name
and description tags
if
(
$propName
==
'name'
)
{
// translate name
tag
$priv_list
[
$aclKey
][
$propName
]
=
gettext
(
$propValue
);
}
else
{
$priv_list
[
$aclKey
][
$propName
]
=
$propValue
;
...
...
src/opnsense/mvc/app/models/OPNsense/Core/ACL/ACL.xml
View file @
9205427c
This diff is collapsed.
Click to expand it.
src/www/system_usermanager.php
View file @
9205427c
...
...
@@ -666,16 +666,29 @@ $( document ).ready(function() {
<td>
<table class="
table
table
-
hover
table
-
condensed
">
<tr>
<td><b><?=gettext("
Inherited
From
");?></b></td>
<td><b><?=gettext("
Inherited
from
");?></b></td>
<td><b><?=gettext("
Type
");?></b></td>
<td><b><?=gettext("
Name
");?></b></td>
<td><b><?=gettext("
Description
");?></b></td>
</tr>
<?php
foreach (get_user_privdesc(
$a_user[$id]
) as
$priv
) :?>
<tr>
<td><?=!empty(
$priv['group']
) ?
$priv['group']
: ""?></td>
<td><?=
$priv['name']
?></td>
<td><?=!empty(
$priv['descr']
) ?
$priv['descr']
: ""?></td>
<td><?=!empty(
$priv['group']
) ?
$priv['group']
: ''?></td>
<td>
<?php
switch (substr(
$id
, 0, 5)) {
case 'page-':
echo gettext('GUI');
break;
case 'user-':
echo gettext('System');
break;
default:
echo gettext('Unknown');
break;
} ?>
</td>
<td><?=
$priv['name']
?></td>
</tr>
<?php
endforeach;?>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment