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
|
- 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.
|
- 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: 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
|
7.7.6
|
||||||
- Added mobile style template. If enabled in settings, will serve alternate style templates
|
- 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);
|
installFilePumpHandler($session);
|
||||||
installFilePumpTable($session);
|
installFilePumpTable($session);
|
||||||
installFilePumpAdminGroup($session);
|
installFilePumpAdminGroup($session);
|
||||||
|
addMatrixMaxGroup($session);
|
||||||
|
|
||||||
finish($session); # this line required
|
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 {
|
sub fixSMSUserProfileI18N {
|
||||||
|
|
|
||||||
|
|
@ -230,6 +230,19 @@ sub definition {
|
||||||
hoverHelp =>$i18n->get('max comparisons privileged description'),
|
hoverHelp =>$i18n->get('max comparisons privileged description'),
|
||||||
label =>$i18n->get('max comparisons privileged label'),
|
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=>{
|
groupToAdd=>{
|
||||||
fieldType =>"group",
|
fieldType =>"group",
|
||||||
tab =>"security",
|
tab =>"security",
|
||||||
|
|
@ -454,6 +467,9 @@ sub getCompareForm {
|
||||||
if($self->session->user->isVisitor){
|
if($self->session->user->isVisitor){
|
||||||
$maxComparisons = $self->get('maxComparisons');
|
$maxComparisons = $self->get('maxComparisons');
|
||||||
}
|
}
|
||||||
|
elsif($self->session->user->isInGroup( $self->get("maxComparisonsGroup") )) {
|
||||||
|
$maxComparisons = $self->get('maxComparisonsGroupInt');
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
$maxComparisons = $self->get('maxComparisonsPrivileged');
|
$maxComparisons = $self->get('maxComparisonsPrivileged');
|
||||||
}
|
}
|
||||||
|
|
@ -628,6 +644,21 @@ sub view {
|
||||||
$var->{search_url} = $self->getUrl('func=search');
|
$var->{search_url} = $self->getUrl('func=search');
|
||||||
$var->{compareForm_url} = $self->getUrl();
|
$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){
|
if ($self->canEdit){
|
||||||
# Get all the MatrixListings that are still pending.
|
# Get all the MatrixListings that are still pending.
|
||||||
my @pendingListings = @{ $self->getLineage(['descendants'], {
|
my @pendingListings = @{ $self->getLineage(['descendants'], {
|
||||||
|
|
@ -858,6 +889,9 @@ sub www_compare {
|
||||||
if($self->session->user->isVisitor){
|
if($self->session->user->isVisitor){
|
||||||
$maxComparisons = $self->get('maxComparisons');
|
$maxComparisons = $self->get('maxComparisons');
|
||||||
}
|
}
|
||||||
|
elsif($self->session->user->isInGroup( $self->get("maxComparisonsGroup") )) {
|
||||||
|
$maxComparisons = $self->get('maxComparisonsGroupInt');
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
$maxComparisons = $self->get('maxComparisonsPrivileged');
|
$maxComparisons = $self->get('maxComparisonsPrivileged');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -427,6 +427,16 @@ listing,|,
|
||||||
lastUpdated => 1135271460,
|
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' => {
|
'max comparisons description' => {
|
||||||
message => q|Specifies how many comparisons are allowed in searches and comparisons.|,
|
message => q|Specifies how many comparisons are allowed in searches and comparisons.|,
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
|
|
@ -603,6 +613,16 @@ to increase performance. How long should we cache them?|,
|
||||||
lastUpdated => 0,
|
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' => {
|
'max comparisons label' => {
|
||||||
message => q|Maximum Comparisons|,
|
message => q|Maximum Comparisons|,
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue