fixed #10133: Matrix compare for priv. group open to any user
This commit is contained in:
parent
beb9b77440
commit
43f09b433f
5 changed files with 64 additions and 0 deletions
|
|
@ -19,6 +19,7 @@
|
|||
- fixed: Display of short pagination bar when there's less than 1 page of data in StoryArchive
|
||||
- added: Storage now has a getHexId method for returning a cached hexadecimal version of the storageId.
|
||||
- fixed: FilePump should copy filesystem directories and their files when given a file URI that is a directory.
|
||||
- fixed #10133: Matrix compare for priv. group open to any user
|
||||
|
||||
7.7.6
|
||||
- Added mobile style template. If enabled in settings, will serve alternate style templates
|
||||
|
|
|
|||
BIN
docs/upgrades/packages-7.7.7/matrix-default-view-template.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.7/matrix-default-view-template.wgpkg
Normal file
Binary file not shown.
|
|
@ -42,9 +42,18 @@ addMapAsset( $session );
|
|||
installFilePumpHandler($session);
|
||||
installFilePumpTable($session);
|
||||
installFilePumpAdminGroup($session);
|
||||
addMatrixMaxGroup($session);
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub addMatrixMaxGroup {
|
||||
my $session = shift;
|
||||
print "\tAdding maxComparisonsGroup to Matrix..." unless $quiet;
|
||||
$session->db->write("alter table Matrix add column maxComparisonsGroup char(22);");
|
||||
$session->db->write("alter table Matrix add column maxComparisonsGroupInt integer;");
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub fixSMSUserProfileI18N {
|
||||
|
|
|
|||
|
|
@ -230,6 +230,19 @@ sub definition {
|
|||
hoverHelp =>$i18n->get('max comparisons privileged description'),
|
||||
label =>$i18n->get('max comparisons privileged label'),
|
||||
},
|
||||
maxComparisonsGroup=>{
|
||||
fieldType =>"group",
|
||||
tab =>"properties",
|
||||
hoverHelp =>$i18n->get('maxgroup description'),
|
||||
label =>$i18n->get('maxgroup label'),
|
||||
},
|
||||
maxComparisonsGroupInt=>{
|
||||
fieldType =>"integer",
|
||||
tab =>"properties",
|
||||
defaultValue =>25,
|
||||
hoverHelp =>$i18n->get('maxgroup per description'),
|
||||
label =>$i18n->get('maxgroup per label'),
|
||||
},
|
||||
groupToAdd=>{
|
||||
fieldType =>"group",
|
||||
tab =>"security",
|
||||
|
|
@ -454,6 +467,9 @@ sub getCompareForm {
|
|||
if($self->session->user->isVisitor){
|
||||
$maxComparisons = $self->get('maxComparisons');
|
||||
}
|
||||
elsif($self->session->user->isInGroup( $self->get("maxComparisonsGroup") )) {
|
||||
$maxComparisons = $self->get('maxComparisonsGroupInt');
|
||||
}
|
||||
else{
|
||||
$maxComparisons = $self->get('maxComparisonsPrivileged');
|
||||
}
|
||||
|
|
@ -627,6 +643,21 @@ sub view {
|
|||
$var->{listAttributes_url} = $self->getUrl('func=listAttributes');
|
||||
$var->{search_url} = $self->getUrl('func=search');
|
||||
$var->{compareForm_url} = $self->getUrl();
|
||||
|
||||
my $maxComparisons;
|
||||
if($self->session->user->isVisitor){
|
||||
$maxComparisons = $self->get('maxComparisons');
|
||||
}
|
||||
elsif($self->session->user->isInGroup( $self->get("maxComparisonsGroup") )) {
|
||||
$maxComparisons = $self->get('maxComparisonsGroupInt');
|
||||
}
|
||||
else{
|
||||
$maxComparisons = $self->get('maxComparisonsPrivileged');
|
||||
}
|
||||
$var->{javascript} = "<script type='text/javascript'>\n".
|
||||
"var maxComparisons = ".$maxComparisons.";\n".
|
||||
"var matrixUrl = '".$self->getUrl."';\n".
|
||||
"</script>";
|
||||
|
||||
if ($self->canEdit){
|
||||
# Get all the MatrixListings that are still pending.
|
||||
|
|
@ -858,6 +889,9 @@ sub www_compare {
|
|||
if($self->session->user->isVisitor){
|
||||
$maxComparisons = $self->get('maxComparisons');
|
||||
}
|
||||
elsif($self->session->user->isInGroup( $self->get("maxComparisonsGroup") )) {
|
||||
$maxComparisons = $self->get('maxComparisonsGroupInt');
|
||||
}
|
||||
else{
|
||||
$maxComparisons = $self->get('maxComparisonsPrivileged');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -427,6 +427,16 @@ listing,|,
|
|||
lastUpdated => 1135271460,
|
||||
},
|
||||
|
||||
'maxgroup per description' => {
|
||||
message => q|Specifies how many comparisons are allowed for the privileged group.|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'maxgroup description' => {
|
||||
message => q|Select a group for which a specific maximum comparisons can be selected.|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'max comparisons description' => {
|
||||
message => q|Specifies how many comparisons are allowed in searches and comparisons.|,
|
||||
lastUpdated => 0,
|
||||
|
|
@ -602,6 +612,16 @@ to increase performance. How long should we cache them?|,
|
|||
message => q|Compare Color: Yes|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'maxgroup per label' => {
|
||||
message => q|Maximum for Privileged Group|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'maxgroup label' => {
|
||||
message => q|Privileged Maximum Group|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'max comparisons label' => {
|
||||
message => q|Maximum Comparisons|,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue