Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
fed9e19e
Commit
fed9e19e
authored
Sep 22, 2018
by
Sietse Ringers
Browse files
Rename AttributeDescription.Index -> DisplayIndex
parent
c13a0cd9
Changes
2
Hide whitespace changes
Inline
Side-by-side
descriptions.go
View file @
fed9e19e
...
...
@@ -64,11 +64,11 @@ type CredentialType struct {
// AttributeDescription is a description of an attribute within a credential type.
type
AttributeDescription
struct
{
ID
string
`xml:"id,attr"`
Optional
string
`xml:"optional,attr" json:",omitempty"`
Index
*
int
`xml:"
i
ndex,attr" json:",omitempty"`
Name
TranslatedString
Description
TranslatedString
ID
string
`xml:"id,attr"`
Optional
string
`xml:"optional,attr" json:",omitempty"`
DisplayIndex
*
int
`xml:"
displayI
ndex,attr" json:",omitempty"`
Name
TranslatedString
Description
TranslatedString
}
func
(
ad
AttributeDescription
)
GetAttributeTypeIdentifier
(
cred
CredentialTypeIdentifier
)
AttributeTypeIdentifier
{
...
...
irmaconfig.go
View file @
fed9e19e
...
...
@@ -1048,8 +1048,8 @@ func (conf *Configuration) checkAttributes(cred *CredentialType) error {
for
i
,
attr
:=
range
cred
.
Attributes
{
conf
.
checkTranslations
(
fmt
.
Sprintf
(
"Attribute %s of credential type %s"
,
attr
.
ID
,
cred
.
Identifier
()
.
String
()),
attr
)
index
:=
i
if
attr
.
Index
!=
nil
{
index
=
*
attr
.
Index
if
attr
.
Display
Index
!=
nil
{
index
=
*
attr
.
Display
Index
}
if
index
>=
count
{
conf
.
Warnings
=
append
(
conf
.
Warnings
,
fmt
.
Sprintf
(
"Credential type %s has invalid attribute index at attribute %d"
,
name
,
i
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment