Skip to content

Commit

Permalink
Merge pull request privacyidea#4050 from privacyidea/license_containe…
Browse files Browse the repository at this point in the history
…r_files

add license header, remove old code
  • Loading branch information
jelinaunger authored Aug 22, 2024
2 parents 2f0db5b + fc09737 commit 247cb67
Show file tree
Hide file tree
Showing 13 changed files with 228 additions and 24 deletions.
19 changes: 19 additions & 0 deletions privacyidea/api/container.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# (c) NetKnights GmbH 2024, https://netknights.it
#
# This code is free software; you can redistribute it and/or
# modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
# as published by the Free Software Foundation; either
# version 3 of the License, or any later version.
#
# This code is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE for more details.
#
# You should have received a copy of the GNU Affero General Public
# License along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# SPDX-FileCopyrightText: 2024 Nils Behlen <[email protected]>
# SPDX-FileCopyrightText: 2024 Jelina Unger <[email protected]>
# SPDX-License-Identifier: AGPL-3.0-or-later
#
import logging

from flask import Blueprint, request, g
Expand Down
19 changes: 19 additions & 0 deletions privacyidea/lib/container.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# (c) NetKnights GmbH 2024, https://netknights.it
#
# This code is free software; you can redistribute it and/or
# modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
# as published by the Free Software Foundation; either
# version 3 of the License, or any later version.
#
# This code is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE for more details.
#
# You should have received a copy of the GNU Affero General Public
# License along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# SPDX-FileCopyrightText: 2024 Nils Behlen <[email protected]>
# SPDX-FileCopyrightText: 2024 Jelina Unger <[email protected]>
# SPDX-License-Identifier: AGPL-3.0-or-later
#
import importlib
import logging
import os
Expand Down
19 changes: 19 additions & 0 deletions privacyidea/lib/containerclass.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# (c) NetKnights GmbH 2024, https://netknights.it
#
# This code is free software; you can redistribute it and/or
# modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
# as published by the Free Software Foundation; either
# version 3 of the License, or any later version.
#
# This code is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE for more details.
#
# You should have received a copy of the GNU Affero General Public
# License along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# SPDX-FileCopyrightText: 2024 Nils Behlen <[email protected]>
# SPDX-FileCopyrightText: 2024 Jelina Unger <[email protected]>
# SPDX-License-Identifier: AGPL-3.0-or-later
#
import logging
from datetime import datetime, timezone

Expand Down
19 changes: 19 additions & 0 deletions privacyidea/lib/containers/smartphone.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# (c) NetKnights GmbH 2024, https://netknights.it
#
# This code is free software; you can redistribute it and/or
# modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
# as published by the Free Software Foundation; either
# version 3 of the License, or any later version.
#
# This code is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE for more details.
#
# You should have received a copy of the GNU Affero General Public
# License along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# SPDX-FileCopyrightText: 2024 Nils Behlen <[email protected]>
# SPDX-FileCopyrightText: 2024 Jelina Unger <[email protected]>
# SPDX-License-Identifier: AGPL-3.0-or-later
#
import logging

from privacyidea.lib.containerclass import TokenContainerClass
Expand Down
19 changes: 19 additions & 0 deletions privacyidea/lib/containers/yubikey.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# (c) NetKnights GmbH 2024, https://netknights.it
#
# This code is free software; you can redistribute it and/or
# modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
# as published by the Free Software Foundation; either
# version 3 of the License, or any later version.
#
# This code is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE for more details.
#
# You should have received a copy of the GNU Affero General Public
# License along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# SPDX-FileCopyrightText: 2024 Nils Behlen <[email protected]>
# SPDX-FileCopyrightText: 2024 Jelina Unger <[email protected]>
# SPDX-License-Identifier: AGPL-3.0-or-later
#
import logging

from privacyidea.lib.containerclass import TokenContainerClass
Expand Down
18 changes: 18 additions & 0 deletions privacyidea/lib/eventhandler/containerhandler.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# (c) NetKnights GmbH 2024, https://netknights.it
#
# This code is free software; you can redistribute it and/or
# modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
# as published by the Free Software Foundation; either
# version 3 of the License, or any later version.
#
# This code is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE for more details.
#
# You should have received a copy of the GNU Affero General Public
# License along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# SPDX-FileCopyrightText: 2024 Jelina Unger <[email protected]>
# SPDX-License-Identifier: AGPL-3.0-or-later
#
__doc__ = """This is the event handler module for container actions.
"""

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
<!--
(c) NetKnights GmbH 2024, https://netknights.it
This code is free software; you can redistribute it and/or
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
as published by the Free Software Foundation; either
version 3 of the License, or any later version.
This code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU AFFERO GENERAL PUBLIC LICENSE for more details.
You should have received a copy of the GNU Affero General Public
License along with this program. If not, see <http://www.gnu.org/licenses/>.
SPDX-FileCopyrightText: 2024 Nils Behlen <[email protected]>
SPDX-FileCopyrightText: 2024 Jelina Unger <[email protected]>
SPDX-License-Identifier: AGPL-3.0-or-later
-->

<div class="form-group">
<div class="form-group">
<select class="form-control"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/**
* (c) NetKnights GmbH 2024, https://netknights.it
*
* This code is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This code is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* SPDX-FileCopyrightText: 2024 Nils Behlen <[email protected]>
* SPDX-FileCopyrightText: 2024 Jelina Unger <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
**/

myApp.controller("containerCreateController", ['$scope', '$http', '$q', 'ContainerFactory', '$stateParams',
'AuthFactory', 'ConfigFactory', 'UserFactory', '$state',
function createContainerController($scope, $http, $q, ContainerFactory, $stateParams,
Expand Down
21 changes: 21 additions & 0 deletions privacyidea/static/components/token/factories/container.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/**
* (c) NetKnights GmbH 2024, https://netknights.it
*
* This code is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This code is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* SPDX-FileCopyrightText: 2024 Nils Behlen <[email protected]>
* SPDX-FileCopyrightText: 2024 Jelina Unger <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
**/

myApp.factory("ContainerFactory", ['AuthFactory', '$http', 'containerUrl', '$q', '$state', '$rootScope',
function (AuthFactory, $http, containerUrl, $q, $state, $rootScope) {
let canceller = $q.defer();
Expand Down
25 changes: 1 addition & 24 deletions privacyidea/static/components/token/states/states.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,7 @@
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/*
angular.module('privacyideaApp.containerStates', ['ui.router', 'privacyideaApp.versioning'])
.config(['$stateProvider', 'versioningSuffixProviderProvider',
function ($stateProvider, versioningSuffixProviderProvider) {
let instance = window.location.pathname;
if (instance === "/") {
instance = "";
}
// TODO change to container path if needed
let tokenpath = instance + "/static/components/token/views/";
$stateProvider
.state('container', {
url: "/container",
templateUrl: tokenpath + "token.containercreate.html" + versioningSuffixProviderProvider.$get().$get(),
controller: "containerCreateController"
})
.state('container.create', {
url: "/container/create",
templateUrl: tokenpath + "token.containercreate.html" + versioningSuffixProviderProvider.$get().$get(),
controller: "containerCreateController"
})
}
]);
*/

angular.module('privacyideaApp.tokenStates', ['ui.router', 'privacyideaApp.versioning']).config(
['$stateProvider', 'versioningSuffixProviderProvider',
function ($stateProvider, versioningSuffixProviderProvider) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
<!--
(c) NetKnights GmbH 2024, https://netknights.it
This code is free software; you can redistribute it and/or
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
as published by the Free Software Foundation; either
version 3 of the License, or any later version.
This code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU AFFERO GENERAL PUBLIC LICENSE for more details.
You should have received a copy of the GNU Affero General Public
License along with this program. If not, see <http://www.gnu.org/licenses/>.
SPDX-FileCopyrightText: 2024 Nils Behlen <[email protected]>
SPDX-FileCopyrightText: 2024 Jelina Unger <[email protected]>
SPDX-License-Identifier: AGPL-3.0-or-later
-->

<div class="well">
<form name="formCreateContainer" role="form" ng-hide="loggedInUser.role == 'user' && !checkRight('container_create')">
<!-- Container Type -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
<!--
(c) NetKnights GmbH 2024, https://netknights.it
This code is free software; you can redistribute it and/or
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
as published by the Free Software Foundation; either
version 3 of the License, or any later version.
This code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU AFFERO GENERAL PUBLIC LICENSE for more details.
You should have received a copy of the GNU Affero General Public
License along with this program. If not, see <http://www.gnu.org/licenses/>.
SPDX-FileCopyrightText: 2024 Nils Behlen <[email protected]>
SPDX-FileCopyrightText: 2024 Jelina Unger <[email protected]>
SPDX-License-Identifier: AGPL-3.0-or-later
-->

<h3 name="Container Details">
<translate>Container details for {{ containerSerial }}</translate>
</h3>
Expand Down
18 changes: 18 additions & 0 deletions privacyidea/static/components/token/views/token.containerlist.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
<!--
(c) NetKnights GmbH 2024, https://netknights.it
This code is free software; you can redistribute it and/or
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
as published by the Free Software Foundation; either
version 3 of the License, or any later version.
This code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU AFFERO GENERAL PUBLIC LICENSE for more details.
You should have received a copy of the GNU Affero General Public
License along with this program. If not, see <http://www.gnu.org/licenses/>.
SPDX-FileCopyrightText: 2024 Nils Behlen <[email protected]>
SPDX-FileCopyrightText: 2024 Jelina Unger <[email protected]>
SPDX-License-Identifier: AGPL-3.0-or-later
-->

<div uib-pagination ng-show="containerdata.count > containersPerPage"
total-items="containerdata.count" ng-model="params.page"
previous-text="{{ 'Previous'|translate }}"
Expand Down

0 comments on commit 247cb67

Please sign in to comment.