Skip to content

Commit

Permalink
chore: add files header
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Tang <jmtangcs@gmail.com>
  • Loading branch information
Standing-Man committed Feb 5, 2025
1 parent 00a11d0 commit 7bc7244
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 2 deletions.
16 changes: 14 additions & 2 deletions cmd/harbor/root/user/reset.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright Project Harbor Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package user

import (
Expand Down Expand Up @@ -41,13 +55,11 @@ func UserResetCmd() *cobra.Command {
if err != nil {
logrus.Errorf("failed to reset user's password: %v", err)
}

},
}

flags := cmd.Flags()
flags.Int64VarP(&UserID, "userID", "", -1, "ID of the user")

return cmd

}
14 changes: 14 additions & 0 deletions cmd/harbor/root/user/update.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright Project Harbor Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package user

import (
Expand Down
14 changes: 14 additions & 0 deletions pkg/views/user/reset/view.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright Project Harbor Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package reset

import (
Expand Down
14 changes: 14 additions & 0 deletions pkg/views/user/update/view.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright Project Harbor Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package update

import (
Expand Down

0 comments on commit 7bc7244

Please sign in to comment.