mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
fix CopyRight to Copyright
This commit is contained in:
@@ -23,12 +23,12 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
type CopyRightUpdateOptions struct {
|
||||
type CopyrightUpdateOptions struct {
|
||||
Copyright string `help:"The copyright"`
|
||||
Email string `help:"The Email"`
|
||||
}
|
||||
|
||||
R(&CopyRightUpdateOptions{}, "copyright-update", "update copyright", func(s *mcclient.ClientSession, args *CopyRightUpdateOptions) error {
|
||||
R(&CopyrightUpdateOptions{}, "copyright-update", "update copyright", func(s *mcclient.ClientSession, args *CopyrightUpdateOptions) error {
|
||||
if !s.HasSystemAdminPrivilege() {
|
||||
return fmt.Errorf("require admin privilege")
|
||||
}
|
||||
@@ -42,7 +42,7 @@ func init() {
|
||||
params.Add(jsonutils.NewString(args.Email), "email")
|
||||
}
|
||||
|
||||
r, err := modules.CopyRight.Create(s, params)
|
||||
r, err := modules.Copyright.Create(s, params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package modules
|
||||
|
||||
type CopyRightManager struct {
|
||||
type CopyrightManager struct {
|
||||
ResourceManager
|
||||
}
|
||||
|
||||
var (
|
||||
CopyRight CopyRightManager
|
||||
Copyright CopyrightManager
|
||||
)
|
||||
|
||||
func init() {
|
||||
CopyRight = CopyRightManager{NewYunionAgentManager("info", "infos",
|
||||
Copyright = CopyrightManager{NewYunionAgentManager("info", "infos",
|
||||
[]string{"copyright", "email"},
|
||||
[]string{})}
|
||||
register(&CopyRight)
|
||||
register(&Copyright)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user