security – How to restrict Jenkins node by label for a group of users

The situation

Say I have a Jenkins installations with multi-branch pipelines which executes on nodes which are implemented as ECS Tasks in AWS. The nodes have specific IAM roles which allow to do certain things like access a certain secret. The coded pipelines choose the node dynamically by label. So far so good.

In this setup, Jenkins is connected through LDAP to OpenLDAP and there are groups set up. Permissions are handled through the “role based strategy”

For the blessed branch of the pipelines there are code reviews but in theory any user can create a branch and use the coded pipeline to retrieve the secrets which the node is allowed to read.

In this situation I though the correct way to enforce security is to prevent certain groups to run jobs on certain nodes.

The question

How can I restrict the usage of a certain node for a certain group of users by label ?

What I tried so far

Since I believe the role based strategy can assign group permissions based on the node name and the ECS nodes get their names based on <cluster name>-<random string> I tried to

  • create a cluster with a specific name for the nodes I want to be able to restrict
  • created two groups eg. standard and privileged
  • globally deny “build” permission for standard group
  • allow “build” permission for standard group on nodes named like <non-privileged cluster name>-.*|master|Jenkins

The problem with this is: it didn’t work for master (some non-privileged pipelines need to perform tasks on the master). I got error messages like 'XXXXXXXX' lacks permission to run on 'Jenkins'

graphs – Understand Label Cover problem

How is the Label Cover problem related to similar problems such as Vertex Cover, Set Cover and graph coloring? When I read about the Label Cover problem then it seems that it is a generalization and that graph coloring problem can be written as a special case of Label Cover problem. Did I understand at least part of it? I found the original article about it “The Hardness of Approximate Optima in Lattices, Codes, and Systems of Linear Equations” and after reading it twice I almost understand the meaning of the Label Cover problem.

Start your own white label crypto investment business – HYIPs

Start your own white label crypto investment business with the most advanced HYIP Script. It consists of highly secured automated payment gateways and the latest features. Take a free demo of it at Zeligz Web Store. Once you take a demo, definitely you love it, and now they are offering it with combo packages. So, it’s a good opportunity to start your own HYIP business at a low cost. Visit their website and get the full details about it.
 

magento2 – Magento 2 get option label from custom admin dropdown

For my custom plugin I created an options array like this:

path : => VendorAppBlockSystemConfig;

namespace VendorAppBlockSystemConfig;

class NatureIva implements MagentoFrameworkDataOptionSourceInterface
{
    public function toOptionArray(){
        
        $optionGroup = ( 
            ('value' => "Scegli", 'label' => __("Scegli...")),
            (
                'label' => 'N1',
                'value' => (
                    (
                        'label' => __("N1 - escluse ex art.15 "),
                        'value' => 'N1'
                    ),
                ),
            ),
            (
                'label' => 'N2',
                'value' => (
                    (
                        'label' => __("N2 - non soggette"),
                        'value' => 'N2'
                    ),
                    (
                        'label' => __("N2.1 - non soggette ad IVA ai sensi degli artt. da 7 a 7-septies del DPR 633/72"),
                        'value' => 'N2.1'
                    ),
                    (
                        'label' => __("N2.2 - altri casi"),
                        'value' => 'N2.2'
                    ),
                ),
            ), 
            (
                'label' => 'N3',
                'value' => (
                    (
                        'label' => __("N3 - non imponibili"),
                        'value' => 'N3'
                    ),
                    (
                        'label' => __("N3.1 - esportazioni"),
                        'value' => 'N3.1'
                    ),
                    (
                        'label' => __("N3.2 - cessioni intracomunitarie"),
                        'value' => 'N3.2'
                    ),
                    (
                        'label' => __("N3.3 - cessioni verso San Marino"),
                        'value' => 'N3.3'
                    ),
                    (
                        'label' => __("N3.4 - operazioni assimilate alle cessioni all'esportazione"),
                        'value' => 'N3.4'
                    ),
                    (
                        'label' => __("N3.5 - a seguito di dichiarazioni d'intento"),
                        'value' => 'N3.5'
                    ),
                    (
                        'label' => __("N3.6 - altre operazioni che non concorrono alla formazione del plafond"),
                        'value' => 'N3.6'
                    ),
                ),
            ),
            (
                'label' => 'N4',
                'value' => (
                    (
                        'label' => __("N4 - esenti "),
                        'value' => 'N4'
                    ),
                ),
            ), 
            (
                'label' => 'N5',
                'value' => (
                    (
                        'label' => __("N5 - regime del margine / IVA non esposta in fattura "),
                        'value' => 'N5'
                    ),
                ),
            ), 
            (
                'label' => 'N6',
                'value' => (
                    (
                        'label' => __("N6 - inversione contabile"),
                        'value' => 'N6'
                    ),
                    (
                        'label' => __("N6.1 - cessione di rottami e altri materiali di recupero"),
                        'value' => 'N6.1'
                    ),
                    (
                        'label' => __("N6.2 - cessione di oro e argento puro"),
                        'value' => 'N6.2'
                    ),
                    (
                        'label' => __("N6.3 - subappalto nel settore edile"),
                        'value' => 'N6.3'
                    ),
                    (
                        'label' => __("N6.4 - cessione di fabbricati"),
                        'value' => 'N6.4'
                    ),
                    (
                        'label' => __("N6.5 - cessione di telefoni cellulari"),
                        'value' => 'N6.5'
                    ),
                    (
                        'label' => __("N6.6 - cessione di prodotti elettronici"),
                        'value' => 'N6.6'
                    ),
                    (
                        'label' => __("N6.7 - prestazioni comparto edile e settori connessi"),
                        'value' => 'N6.7'
                    ),
                    (
                        'label' => __("N6.8  - operazioni settore energetico"),
                        'value' => 'N6.8'
                    ),
                    (
                        'label' => __("N6.9 - altri casi"),
                        'value' => 'N6.9'
                    ),
                ),
            ),
            (
                'label' => 'N7',
                'value' => (
                    (
                        'label' => __("N7 - IVA assolta in altro stato UE"),
                        'value' => 'N7'
                    ),
                ),
            ),     
        );
        
        return $optionGroup;
}
}

I already added the necessary code in VendorAppetcadminhtmlsystem.xml:

<field id="natura_iva" translate="label comment" type="select" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Natura Iva</label>
                    <source_model>Fattura24AppFatturazioneBlockSystemConfigNatureIva</source_model>
                    <comment>Specifica la Natura IVA predefinita per Aliquote pari a 0%</comment>
                </field>

I can see the option list in my menu correctly.

in my Helper I use $this->getConfig('fattura24/fatture/natura_iva', $storeId); to get the option value selected. Now I would like to add the label text related to that option. Any idea about how to do this?

sass – primeng dropdown label width

I use a primeng dropdown input and I want to make the div that holds the label placeholder to have 100% width.
Here is how I use it:

<div class="ui-grid ui-grid-responsive ui-fluid">
    <div class="ui-grid-row">
        <div class="ui-grid-col-2">
            <p-dropdown (options)="solutionsDropDownData" ((ngModel))="solutionDropDownValue" placeholder="Solution..."
                (filter)="true" (onChange)="onSolutionChange($event)">
            </p-dropdown>
        </div>
    </div>
</div>

The problem is that I get a space after the placeholder while I want the placeholder to be full width. The space can be seen below:
white space width after placeholder 1

When I choose an other value, with smaller length for example, the width of the space changes, it becomes bigger if I used the same example.
white space width after placeholder 2

I already tried this approaches, but none of them worked:

  1. used autoWidth parameter, but this one gives me Can't bind to 'autoWidth' since it isn't a known property of 'p-dropdown'. error if I use it with brackets; the error disappears if I use it without brackets, but it doesn’t work (I mention that I imported the DropdownModule);

  2. used css classes like below (I used them separately and both, alternatively):

    .ui-dropdown-label-container{
    width:100% !important;
    }

    .ui-dropdown .ui-dropdown-panel {
    min-width: 100% !important;
    width: max-content;
    }

  3. used style parameter.

views – Changing the label of Change Password Form

How to change the form label from Password to New Password and Confirm password to New Confirm password on THEME_form_user_form_alter(without changing any twig files)? I had tried kint($form('account')('pass')) to see any possible way, no clue…

Current Change Password Form

Current password

|||||||||||||||||

Password (to New Password)

|||||||||||||||||

Confirm password (to New Confirm password)

|||||||||||||||||

function THEME_form_user_form_alter(&$form, $form_state) {
  kint($form('account'));
}

There are no #title element on pass field.

enter image description here

magento2 – Magento 2 How to get Category attribute value label

Try to use below line in your phtml file, and replace category_lpage_products with your attribute code.

<?php
    $title = $this->helper('MagentoCatalogHelperOutput')->categoryAttribute($block->getCurrentCategory(), $block->getCurrentCategory()->getCategoryLpageProducts(), 'category_lpage_products')
?>

Update

You can create one Helper file to get options like below

app/code/GetSomeMojo/CategoryLandingPage/Helper/Data.php

Content for above file is..

<?php

namespace GetSomeMojoCategoryLandingPageHelper;

use MagentoFrameworkAppHelperAbstractHelper;

class Data extends AbstractHelper
{
    protected $_categoryLandingPageProducts;

    public function __construct(
        GetSomeMojoCategoryLandingPageModelEntityAttributeSourceLandingpageproducts $categoryLandingPageProducts
    ) {
        $this->_categoryLandingPageProducts = $categoryLandingPageProducts;
    }

    public function getAttributeOptionText($attributeOptionId)
    {
        return $this->_categoryLandingPageProducts->getOptionText($attributeOptionId);
    }
}

Now you can get attribute value in your phtml file using below code

<?php
    $categoryAttributeOptionId = $block->getCurrentCategory()->getData('category_lpage_products');
    $value = $this->helper('GetSomeMojoCategoryLandingPageHelperData')->getAttributeOptionText($categoryAttributeOptionId);
?>

Hope this will help you!

Bug-free white label HYIP Script in your budget – HYIPs

Zeligz HYIP provides bug-free white label HYIP Script to create and manage the HYIP program. Their experts develop the most secure & easy to use, script to run an online investment program. They give the best and reliable service at an affordable budget. So if you are going to start an HYIP Program then visit once Zeligz Web Store and check their free demo.
 

gmail – unable to create Travel label?

When I try to create a “Travel” label in a work email address of mine I get the following error:

Sorry, you can’t create a label named “travel” (it’s a reserved system label)

I don’t understand. I have a “Travel” label for my personal gmail address..

data tables – which label is correct: date of request/answer or request date/answer date?

i am working on a table which has 2 columns: date of request and date of answer (to the request) and i am wondering which label should i use: date of request/answer or request date/answer date?

Which is better from a UX perspective do you think?

or is it more a matter of grammar?