mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-30 00:00:13 +01:00

Admins can create/edit and delete users (with all their projects etc.) Deleting a user/project/visualization automatically deletes all its belonging data (e.g. deleting a visualization deletes all plots). When creating and deleting objects the relationship is (mostly) handled server side. Only the first required relationship (e.g. when creating a new project, the project's owner is set client-side, the rest is matched on the server).
17 lines
393 B
JavaScript
17 lines
393 B
JavaScript
import Ember from 'ember';
|
|
|
|
export default Ember.Controller.extend({
|
|
users: function() {
|
|
var filteredUsers = this.get('model');
|
|
filteredUsers.forEach(function(user) {
|
|
// catch undefined user
|
|
if (user) {
|
|
if (user.get('id') === 'me') {
|
|
filteredUsers.removeObject(user);
|
|
}
|
|
}
|
|
});
|
|
|
|
return filteredUsers;
|
|
}.property('model.@each')
|
|
});
|