Language: PHP
Label: vulnerable
CWE: CWE-281 \u2014 Improper Preservation of Permissions
The product does not preserve permissions or incorrectly preserves permissions when copying, restoring, or sharing objects, which can cause them to have less restrictive permissions than intended.

Code:
    public function __construct(
        BaseLanguage $language,
        $platform_allows_restricted,
        $project_visibility,
        int $number_of_restricted_users_in_project,
        ProjectVisibilityOptionsForPresenterGenerator $project_visibility_options_generator,
    ) {
        $this->platform_allows_restricted       = (bool) $platform_allows_restricted;
        $this->restricted_warning_message       = $language->getText(
            'project_admin_editgroupinfo',
            'restricted_warning'
        );
        $this->general_warning_message          = $language->getText(
            'project_admin_editgroupinfo',
            'general_warning'
        );
        $this->purified_term_of_service_message = Codendi_HTMLPurifier::instance()->purify(
            $language->getOverridableText('project_admin_editgroupinfo', 'term_of_service'),
            CODENDI_PURIFIER_LIGHT
        );

        $this->project_visibility_label = _('Project visibility');
        $this->accept_tos_message       = _("Please accept term of service");

        $this->options                               = $project_visibility_options_generator->generateVisibilityOptions(
            $this->platform_allows_restricted,
            $project_visibility
        );
        $this->number_of_restricted_users_in_project = $number_of_restricted_users_in_project;
    }