Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to set organization visibility (public, internal, private) #1763

Merged
merged 167 commits into from
Feb 18, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
c2a75b3
Add UI visibility in organization settings
DblK May 19, 2017
4df763c
Set Visibility Public by default when creating new organization
DblK May 19, 2017
9d73ff4
Implement visibility in explore/organizations
DblK May 21, 2017
7bdc6e8
Implement visibility in explore/repos
DblK May 21, 2017
fb0c45a
Implement global configuration for new organizations
DblK May 22, 2017
90ec030
Add in admin/repos and admin/org gold lock icons for private organiza…
DblK May 22, 2017
8eaddfc
Handle display of repositories from explore/repo and when viewing an …
DblK May 22, 2017
20e63bb
Add lock icon for private org on explore/repo
DblK May 23, 2017
15d9e00
User profile display organization based on Membership Visibility and …
DblK May 24, 2017
49e4008
Resolve Conflict for merging
DblK May 24, 2017
fcf8516
Merge remote-tracking branch 'upstream/master' into feature_AllowPriv…
techknowlogick Jun 8, 2018
86d1e78
Fix build errors
techknowlogick Jun 8, 2018
1d74ce3
make fmt
techknowlogick Jun 8, 2018
79131fc
Update string per @BKC's suggestion
techknowlogick Jun 8, 2018
6d87477
Use UpdatedUnix instead of just Updated
techknowlogick Jun 8, 2018
9c797ba
use TimeSinceUnix instead of TimeSince
techknowlogick Jun 8, 2018
79401e3
add migration
techknowlogick Jun 8, 2018
df88dbf
Merge branch 'feature_AllowPrivateOrganization' of github.com:DblK/gi…
techknowlogick Jun 8, 2018
b1a19ef
fix migration
techknowlogick Jun 8, 2018
af87b29
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Jun 8, 2018
c850416
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Jun 9, 2018
059dba5
update date
techknowlogick Jun 9, 2018
8a36cf2
update with suggested code
techknowlogick Jun 11, 2018
c0fa0de
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Jun 11, 2018
819085a
prepare for conflict resolution
techknowlogick Jun 29, 2018
917cf76
Merge remote-tracking branch 'upstream/master' into feature_AllowPriv…
techknowlogick Jun 29, 2018
0b0b603
hide org profile page if needed when directly accessed
techknowlogick Jun 29, 2018
6db8162
hide repo if hidden
techknowlogick Jun 29, 2018
d4c6367
Chose visibility when creating org
techknowlogick Jun 29, 2018
7ee585f
fix build error
techknowlogick Jun 29, 2018
87f16f9
add copyright
techknowlogick Jun 29, 2018
f884657
add copyright
techknowlogick Jun 29, 2018
38556b9
update copyright
techknowlogick Jun 29, 2018
e46bd24
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Jul 13, 2018
0e546f1
Merge remote-tracking branch 'upstream/master' into feature_AllowPriv…
techknowlogick Jul 14, 2018
250f858
add checks to api & some tests
techknowlogick Jul 14, 2018
a60f4be
make fmt
techknowlogick Jul 14, 2018
502fed5
add copyright
techknowlogick Jul 14, 2018
4a1e0bd
add copyright
techknowlogick Jul 14, 2018
28fc8f0
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Jul 14, 2018
36d9124
rename migration
techknowlogick Jul 21, 2018
5a69b47
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Jul 21, 2018
5df42b4
make fmt
techknowlogick Jul 21, 2018
285b47b
Rename v71.go to v77.go
techknowlogick Jan 4, 2019
e3a4a08
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Jan 4, 2019
d434cec
make fmt fix
techknowlogick Jan 4, 2019
06a7d56
Update user.go
techknowlogick Jan 4, 2019
8f4f59d
resolve @bkcsoft feedback
techknowlogick Jan 4, 2019
24d2e48
Update org.go
techknowlogick Jan 4, 2019
0ed54b6
step before merge master
techknowlogick Jan 22, 2019
f8977ad
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Jan 22, 2019
20d33dd
make fmt
techknowlogick Jan 22, 2019
e9a1664
add sql queries
techknowlogick Jan 22, 2019
25dcc39
Merge branch 'feature_AllowPrivateOrganization' of github.com:DblK/gi…
techknowlogick Jan 22, 2019
c424cc3
remove TODO
techknowlogick Jan 22, 2019
1538c29
Fix Tests
techknowlogick Jan 22, 2019
878b887
accept post field on create
techknowlogick Jan 22, 2019
b5faeaf
add func per BKC feedback
techknowlogick Jan 22, 2019
cda121f
add comment to func
techknowlogick Jan 22, 2019
1e237d4
update per BKC feedback
techknowlogick Jan 22, 2019
15f4c95
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Jan 23, 2019
6f4da0b
update year
techknowlogick Jan 23, 2019
bc208a7
update year
techknowlogick Jan 23, 2019
9df3bf0
update year
techknowlogick Jan 23, 2019
16f4012
update year
techknowlogick Jan 23, 2019
b7f88b2
add copyright
techknowlogick Jan 23, 2019
51a10cd
update year
techknowlogick Jan 23, 2019
7c04589
update year
techknowlogick Jan 23, 2019
99bad71
Update year
techknowlogick Jan 23, 2019
a085b47
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Jan 28, 2019
fd24c9f
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Jan 28, 2019
f9122f3
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Jan 30, 2019
829e9f2
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Jan 31, 2019
70471ab
Update app.ini.sample
techknowlogick Jan 31, 2019
f32baca
Update setting.go
techknowlogick Jan 31, 2019
d6241c8
Add docs
techknowlogick Jan 31, 2019
b66b8f0
Update org.go
techknowlogick Jan 31, 2019
1d48754
Update user.go
techknowlogick Jan 31, 2019
8be87bc
Update modules/setting/setting.go
techknowlogick Jan 31, 2019
a100940
Update to use constants
techknowlogick Jan 31, 2019
8ea71f6
remove redundant conditional
techknowlogick Jan 31, 2019
a68ecf9
split up func for has visibility
techknowlogick Feb 1, 2019
17e3a38
combine conditional
techknowlogick Feb 1, 2019
cf3b71b
refactor structs into new package
techknowlogick Feb 1, 2019
fd51d42
fix syntax
techknowlogick Feb 1, 2019
eed990a
export struct
techknowlogick Feb 1, 2019
8826686
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 1, 2019
3a3a1cb
fix query & template - still more todo
techknowlogick Feb 1, 2019
0d1cd97
Merge branch 'feature_AllowPrivateOrganization' of github.com:DblK/gi…
techknowlogick Feb 1, 2019
4ed648e
reset before sql changes
techknowlogick Feb 1, 2019
0483344
try to fix mssql
techknowlogick Feb 1, 2019
e67cbd0
repo SQL
techknowlogick Feb 2, 2019
9cd145c
remove TODO comment
techknowlogick Feb 2, 2019
0159beb
make fmt
techknowlogick Feb 2, 2019
8d26cb6
fix spacing
techknowlogick Feb 2, 2019
45b706c
more spacing
techknowlogick Feb 2, 2019
14e6d04
try different sql join
techknowlogick Feb 2, 2019
5e02b7b
make fmt
techknowlogick Feb 2, 2019
30bdaa0
correct capitalization
techknowlogick Feb 2, 2019
2ffc296
resolve postgresql errors
techknowlogick Feb 2, 2019
7f63414
more psql fixes
techknowlogick Feb 2, 2019
78ed0a7
SQL
techknowlogick Feb 2, 2019
97802f2
psql
techknowlogick Feb 2, 2019
ac9aad0
fix mysql
techknowlogick Feb 2, 2019
373e1f5
work for all DB types
techknowlogick Feb 2, 2019
da64f72
work on all DBs hopefully
techknowlogick Feb 2, 2019
64af3a6
mssql
techknowlogick Feb 2, 2019
d22dff8
mssql
techknowlogick Feb 2, 2019
55cba7c
Update config-cheat-sheet.en-us.md
techknowlogick Feb 2, 2019
655c772
Update user.go
techknowlogick Feb 2, 2019
3a5d9ad
Update structs.go
techknowlogick Feb 2, 2019
3e236c5
Delete v79.go
techknowlogick Feb 2, 2019
148039e
Update migrations.go
techknowlogick Feb 2, 2019
996ee26
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 2, 2019
fc19628
Update user.go
techknowlogick Feb 2, 2019
35c4175
Update user.go
techknowlogick Feb 2, 2019
907a5ba
update per feedback
techknowlogick Feb 2, 2019
583a400
fix comment
techknowlogick Feb 2, 2019
c8cbf1f
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 3, 2019
b4b6871
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 4, 2019
a10dfae
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 4, 2019
4fce179
Update org.go
techknowlogick Feb 4, 2019
c8b844f
Update repo.go
techknowlogick Feb 4, 2019
7f05374
Update view.go
techknowlogick Feb 4, 2019
f94e040
Update home.go
techknowlogick Feb 4, 2019
7082b4a
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 4, 2019
b1f7a5d
Update list.tmpl
techknowlogick Feb 4, 2019
ec4b110
Update profile.tmpl
techknowlogick Feb 4, 2019
54ddf81
Update options.tmpl
techknowlogick Feb 4, 2019
caf2acf
Update create.tmpl
techknowlogick Feb 4, 2019
881db82
Update repo_list.tmpl
techknowlogick Feb 4, 2019
87d8463
Update create.tmpl
techknowlogick Feb 4, 2019
f33a083
Update organizations.tmpl
techknowlogick Feb 4, 2019
5b18778
Update list.tmpl
techknowlogick Feb 4, 2019
be4f405
Update options.tmpl
techknowlogick Feb 4, 2019
39e8464
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 5, 2019
9462c2d
Update structs.go
techknowlogick Feb 6, 2019
46c75f3
move structs to structs package
techknowlogick Feb 6, 2019
3fcebe6
Update repo_list.go
techknowlogick Feb 6, 2019
88d250a
Update org.go
techknowlogick Feb 6, 2019
1afc055
update per @lunny feedback
techknowlogick Feb 6, 2019
dfc6679
split up lines
techknowlogick Feb 6, 2019
ec77786
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 6, 2019
0f99946
fix build
techknowlogick Feb 6, 2019
f6a85ea
Merge branch 'feature_AllowPrivateOrganization' of github.com:DblK/gi…
techknowlogick Feb 6, 2019
c8e22a8
fix build issues
techknowlogick Feb 6, 2019
3423b2e
Update create.tmpl
techknowlogick Feb 6, 2019
3994a5a
Update repo_list.tmpl
techknowlogick Feb 6, 2019
bd0add3
update templates
techknowlogick Feb 6, 2019
955ff90
update templates
techknowlogick Feb 6, 2019
eb4e19d
rename DefaultVisibility to DefaultOrgVisibility
techknowlogick Feb 6, 2019
2c19f68
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 6, 2019
7a03024
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 7, 2019
91db977
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 7, 2019
3ff683e
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 9, 2019
69e9bad
Merge remote-tracking branch 'upstream/master' into feature_AllowPriv…
techknowlogick Feb 10, 2019
fae9107
fix build
techknowlogick Feb 10, 2019
58e5585
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 10, 2019
bda7c8d
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 11, 2019
7cae78f
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 11, 2019
c9595fc
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 13, 2019
9db666c
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 13, 2019
c165437
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 14, 2019
dee33fc
Merge branch 'master' into feature_AllowPrivateOrganization
techknowlogick Feb 14, 2019
958530a
Merge branch 'master' into feature_AllowPrivateOrganization
lunny Feb 17, 2019
b7c26e1
Merge branch 'master' into feature_AllowPrivateOrganization
lunny Feb 18, 2019
e6891d9
Merge branch 'master' into feature_AllowPrivateOrganization
lafriks Feb 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
hide repo if hidden
  • Loading branch information
techknowlogick committed Jun 29, 2018
commit 6db8162c04e8400e0d72130d6aa031ccd6cd0488
6 changes: 6 additions & 0 deletions routers/repo/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,12 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st

// Home render repository home page
func Home(ctx *context.Context) {

canSeeOrg := models.HasOrgVisible([]*models.User{ctx.Repo.Repository.Owner}, ctx.User)
if !canSeeOrg {
ctx.NotFound("HasOrgVisible", nil)
return
}
if len(ctx.Repo.Repository.Units) > 0 {
var firstUnit *models.Unit
for _, repoUnit := range ctx.Repo.Repository.Units {
Expand Down
1 change: 1 addition & 0 deletions routers/user/home.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2014 The Gogs Authors. All rights reserved.
// Copyright 2018 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

Expand Down