Skip to content

Commit

Permalink
Access Control fix: edit user accounts (#375).
Browse files Browse the repository at this point in the history
The direct Username and Password topics are not editable anymore and thus can cause no error.
Only User Account topics are editbale.

See ticket 375.
  • Loading branch information
jri committed Feb 25, 2013
1 parent 4194b40 commit 5ba57b8
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,9 @@ public void postUpdateTopic(Topic topic, TopicModel newModel, TopicModel oldMode
//
logger.info("### Username has changed from \"" + oldUsername + "\" -> \"" + newUsername +
"\". Setting \"" + newUsername + "\" as the new owner of 3 topics:\n" +
" - User Account topic (ID " + topic.getId() + ")\n" +
" - Username topic (ID " + usernameTopic.getId() + ")\n" +
" - Password topic (ID " + passwordTopic.getId() + ")");
" - User Account topic (ID " + topic.getId() + ")\n" +
" - Username topic (ID " + usernameTopic.getId() + ")\n" +
" - Password topic (ID " + passwordTopic.getId() + ")");
setOwner(topic.getId(), newUsername);
setOwner(usernameTopic.getId(), newUsername);
setOwner(passwordTopic.getId(), newUsername);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,28 @@
value: "Username",
uri: "dm4.accesscontrol.username",
data_type_uri: "dm4.core.text",
index_mode_uris: ["dm4.core.key", "dm4.core.fulltext"]
index_mode_uris: ["dm4.core.key", "dm4.core.fulltext"],
view_config_topics: [
{
type_uri: "dm4.webclient.view_config",
composite: {
dm4.webclient.locked: true
}
}
]
},
{
value: "Password",
uri: "dm4.accesscontrol.password",
data_type_uri: "dm4.core.text"
data_type_uri: "dm4.core.text",
view_config_topics: [
{
type_uri: "dm4.webclient.view_config",
composite: {
dm4.webclient.locked: true
}
}
]
},
{
value: "User Account",
Expand All @@ -22,12 +38,28 @@
{
child_type_uri: "dm4.accesscontrol.username",
child_cardinality_uri: "dm4.core.one",
assoc_type_uri: "dm4.core.composition_def"
assoc_type_uri: "dm4.core.composition_def",
view_config_topics: [
{
type_uri: "dm4.webclient.view_config",
composite: {
dm4.webclient.locked: false
}
}
]
},
{
child_type_uri: "dm4.accesscontrol.password",
child_cardinality_uri: "dm4.core.one",
assoc_type_uri: "dm4.core.composition_def"
assoc_type_uri: "dm4.core.composition_def",
view_config_topics: [
{
type_uri: "dm4.webclient.view_config",
composite: {
dm4.webclient.locked: false
}
}
]
}
],
view_config_topics: [
Expand Down
2 changes: 1 addition & 1 deletion modules/dm4-help/src/main/resources/web/script/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dm4c.add_plugin("de.deepamehta.help", function() {
'<div class="field-label">Version</div>' +
'<div>${project.version}</div>' +
'<div class="field-label">Release Date</div>' +
'<div>Feb 24, 2013</div>' +
'<div>Feb 26, 2013</div>' +
'<div class="field-label">Copyright</div>' +
'<div>2000-2013 Jörg Richter et al.</div>' +
'<div class="field-label">License</div>' +
Expand Down

0 comments on commit 5ba57b8

Please sign in to comment.