Compare commits

..

No commits in common. "638fbd0b78f3464b5cebcad26d3f18cb32183069" and "a239d6c4a904c822f1af32545acb09ded8017d13" have entirely different histories.

5 changed files with 8 additions and 37 deletions

View File

@ -574,16 +574,12 @@ func runCreateUser(c *cli.Context) error {
restricted = util.OptionalBoolOf(c.Bool("restricted")) restricted = util.OptionalBoolOf(c.Bool("restricted"))
} }
// default user visibility in app.ini
visibility := setting.Service.DefaultUserVisibilityMode
u := &user_model.User{ u := &user_model.User{
Name: username, Name: username,
Email: c.String("email"), Email: c.String("email"),
Passwd: password, Passwd: password,
IsAdmin: c.Bool("admin"), IsAdmin: c.Bool("admin"),
MustChangePassword: changePassword, MustChangePassword: changePassword,
Visibility: visibility,
} }
overwriteDefault := &user_model.CreateUserOverwriteOptions{ overwriteDefault := &user_model.CreateUserOverwriteOptions{

View File

@ -9,7 +9,8 @@ import "time"
// Commentable can be commented upon // Commentable can be commented upon
type Commentable interface { type Commentable interface {
Reviewable GetLocalIndex() int64
GetForeignIndex() int64
GetContext() DownloaderContext GetContext() DownloaderContext
} }

View File

@ -35,15 +35,6 @@ func (issue *Issue) GetExternalName() string { return issue.PosterName }
// GetExternalID ExternalUserMigrated interface // GetExternalID ExternalUserMigrated interface
func (issue *Issue) GetExternalID() int64 { return issue.PosterID } func (issue *Issue) GetExternalID() int64 { return issue.PosterID }
func (issue *Issue) GetLocalIndex() int64 { return issue.Number } func (issue *Issue) GetLocalIndex() int64 { return issue.Number }
func (issue *Issue) GetForeignIndex() int64 { return issue.ForeignIndex }
func (issue *Issue) GetForeignIndex() int64 {
// see the comment of Reviewable.GetForeignIndex
// if there is no ForeignIndex, then use LocalIndex
if issue.ForeignIndex == 0 {
return issue.Number
}
return issue.ForeignIndex
}
func (issue *Issue) GetContext() DownloaderContext { return issue.Context } func (issue *Issue) GetContext() DownloaderContext { return issue.Context }

View File

@ -9,16 +9,6 @@ import "time"
// Reviewable can be reviewed // Reviewable can be reviewed
type Reviewable interface { type Reviewable interface {
GetLocalIndex() int64 GetLocalIndex() int64
// GetForeignIndex presents the foreign index, which could be misused:
// For example, if there are 2 Gitea sites: site-A exports a dataset, then site-B imports it:
// * if site-A exports files by using its LocalIndex
// * from site-A's view, LocalIndex is site-A's IssueIndex while ForeignIndex is site-B's IssueIndex
// * but from site-B's view, LocalIndex is site-B's IssueIndex while ForeignIndex is site-A's IssueIndex
//
// So the exporting/importing must be paired, but the meaning of them looks confusing then:
// * either site-A and site-B both use LocalIndex during dumping/restoring
// * or site-A and site-B both use ForeignIndex
GetForeignIndex() int64 GetForeignIndex() int64
} }
@ -48,7 +38,7 @@ type Review struct {
// GetExternalName ExternalUserMigrated interface // GetExternalName ExternalUserMigrated interface
func (r *Review) GetExternalName() string { return r.ReviewerName } func (r *Review) GetExternalName() string { return r.ReviewerName }
// GetExternalID ExternalUserMigrated interface // ExternalID ExternalUserMigrated interface
func (r *Review) GetExternalID() int64 { return r.ReviewerID } func (r *Review) GetExternalID() int64 { return r.ReviewerID }
// ReviewComment represents a review comment // ReviewComment represents a review comment

View File

@ -2126,7 +2126,9 @@ a.ui.label:hover {
border: 1px solid var(--color-light-border); border: 1px solid var(--color-light-border);
color: var(--color-text); color: var(--color-text);
} }
.ui.tertiary.button {
border: none;
}
.page-content .ui.button { .page-content .ui.button {
box-shadow: none !important; box-shadow: none !important;
} }
@ -2242,15 +2244,6 @@ a.ui.label:hover {
color: var(--color-secondary-dark-8) !important; color: var(--color-secondary-dark-8) !important;
} }
.ui.tertiary.button {
color: var(--color-text-light);
border: none;
}
.ui.tertiary.button:hover {
color: var(--color-text);
}
.ui.primary.label, .ui.primary.label,
.ui.primary.labels .label { .ui.primary.labels .label {
background-color: var(--color-primary) !important; background-color: var(--color-primary) !important;