mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-15 00:01:25 -04:00
Compare commits
No commits in common. "638fbd0b78f3464b5cebcad26d3f18cb32183069" and "a239d6c4a904c822f1af32545acb09ded8017d13" have entirely different histories.
638fbd0b78
...
a239d6c4a9
@ -574,16 +574,12 @@ func runCreateUser(c *cli.Context) error {
|
||||
restricted = util.OptionalBoolOf(c.Bool("restricted"))
|
||||
}
|
||||
|
||||
// default user visibility in app.ini
|
||||
visibility := setting.Service.DefaultUserVisibilityMode
|
||||
|
||||
u := &user_model.User{
|
||||
Name: username,
|
||||
Email: c.String("email"),
|
||||
Passwd: password,
|
||||
IsAdmin: c.Bool("admin"),
|
||||
MustChangePassword: changePassword,
|
||||
Visibility: visibility,
|
||||
}
|
||||
|
||||
overwriteDefault := &user_model.CreateUserOverwriteOptions{
|
||||
|
@ -9,7 +9,8 @@ import "time"
|
||||
|
||||
// Commentable can be commented upon
|
||||
type Commentable interface {
|
||||
Reviewable
|
||||
GetLocalIndex() int64
|
||||
GetForeignIndex() int64
|
||||
GetContext() DownloaderContext
|
||||
}
|
||||
|
||||
|
@ -35,15 +35,6 @@ func (issue *Issue) GetExternalName() string { return issue.PosterName }
|
||||
// GetExternalID ExternalUserMigrated interface
|
||||
func (issue *Issue) GetExternalID() int64 { return issue.PosterID }
|
||||
|
||||
func (issue *Issue) GetLocalIndex() int64 { return issue.Number }
|
||||
|
||||
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) GetLocalIndex() int64 { return issue.Number }
|
||||
func (issue *Issue) GetForeignIndex() int64 { return issue.ForeignIndex }
|
||||
func (issue *Issue) GetContext() DownloaderContext { return issue.Context }
|
||||
|
@ -9,16 +9,6 @@ import "time"
|
||||
// Reviewable can be reviewed
|
||||
type Reviewable interface {
|
||||
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
|
||||
}
|
||||
|
||||
@ -48,7 +38,7 @@ type Review struct {
|
||||
// GetExternalName ExternalUserMigrated interface
|
||||
func (r *Review) GetExternalName() string { return r.ReviewerName }
|
||||
|
||||
// GetExternalID ExternalUserMigrated interface
|
||||
// ExternalID ExternalUserMigrated interface
|
||||
func (r *Review) GetExternalID() int64 { return r.ReviewerID }
|
||||
|
||||
// ReviewComment represents a review comment
|
||||
|
@ -2126,7 +2126,9 @@ a.ui.label:hover {
|
||||
border: 1px solid var(--color-light-border);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.ui.tertiary.button {
|
||||
border: none;
|
||||
}
|
||||
.page-content .ui.button {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
@ -2242,15 +2244,6 @@ a.ui.label:hover {
|
||||
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.labels .label {
|
||||
background-color: var(--color-primary) !important;
|
||||
|
Loading…
x
Reference in New Issue
Block a user