Project

General

Profile

Actions

Bug #4470

closed

Using both permissions() and permissions_recurse() into a MetaTechnique will create a metadata.xml not valid

Added by Nicolas PERRON about 10 years ago. Updated almost 2 years ago.

Status:
Released
Priority:
1
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

If in a MetaTechnique, we use permissions() and permissions_recurse(), during rudderification, the metadata.xml generated will be "malformed" since it will contain:

[...]
<SECTION component="true" multivalued="true" name="Permissions recurse">
  <REPORTKEYS>
     [...]
  </REPORTKEYS>
</SECTION>
[...]

<SECTION component="true" multivalued="true" name="Permissions recurse">
  <REPORTKEYS>
     [...]
  </REPORTKEYS>
</SECTION>
[...]

I suppose this is due to the fact that permissions() and permissions_recurse() are two different bundles using the same method permissions_type_recurse().

Actions #1

Updated by Jonathan CLARKE about 10 years ago

  • Status changed from New to Pending technical review
  • Assignee set to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/ncf/pull/40

Had a look into this. It turns out it's a simple one: both permissions and permissions_recurse have the same "@name" attribute defined. So they appear as duplicates in the generated metadata.xml.

This PR fixes the problem and adds a test to ensure this is detected, so it won't happen again: https://github.com/Normation/ncf/pull/40

Actions #2

Updated by Jonathan CLARKE about 10 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

Applied in changeset commit:86bc8043591512899bb402bd3ee16b9538545217.

Actions #3

Updated by Nicolas CHARLES about 10 years ago

Applied in changeset commit:8cda1be600e98bb5c4e0de6cac0235b7b649d1ae.

Actions #4

Updated by Vincent MEMBRÉ over 7 years ago

  • Status changed from Pending release to Released
Actions #5

Updated by Alexis Mousset almost 2 years ago

  • Target version changed from 0.x to ncf-0.x
  • Priority set to 0
Actions #6

Updated by Alexis Mousset almost 2 years ago

  • Project changed from 41 to Rudder
  • Category set to Generic methods
Actions

Also available in: Atom PDF