mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-15 00:01:25 -04:00
Compare commits
3 Commits
a239d6c4a9
...
638fbd0b78
Author | SHA1 | Date | |
---|---|---|---|
|
638fbd0b78 | ||
|
3647e62ef9 | ||
|
37bbf2c902 |
@ -574,12 +574,16 @@ 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{
|
||||||
|
@ -9,8 +9,7 @@ import "time"
|
|||||||
|
|
||||||
// Commentable can be commented upon
|
// Commentable can be commented upon
|
||||||
type Commentable interface {
|
type Commentable interface {
|
||||||
GetLocalIndex() int64
|
Reviewable
|
||||||
GetForeignIndex() int64
|
|
||||||
GetContext() DownloaderContext
|
GetContext() DownloaderContext
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,15 @@ 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 }
|
||||||
|
@ -9,6 +9,16 @@ 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
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,7 +48,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 }
|
||||||
|
|
||||||
// ExternalID ExternalUserMigrated interface
|
// GetExternalID 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
|
||||||
|
@ -2126,9 +2126,7 @@ 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;
|
||||||
}
|
}
|
||||||
@ -2244,6 +2242,15 @@ 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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user