forked from apolloconfig/apollo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request apolloconfig#553 from lepdou/private_namespace
app's admin can create private namespace. & default create namespace …
- Loading branch information
Showing
28 changed files
with
204 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...tal/src/main/java/com/ctrip/framework/apollo/portal/controller/PageSettingController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.ctrip.framework.apollo.portal.controller; | ||
|
||
import com.ctrip.framework.apollo.portal.component.config.PortalConfig; | ||
import com.ctrip.framework.apollo.portal.entity.vo.PageSetting; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestMethod; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
public class PageSettingController { | ||
|
||
@Autowired | ||
private PortalConfig portalConfig; | ||
|
||
@RequestMapping(value = "/page-settings", method = RequestMethod.GET) | ||
public PageSetting getPageSetting() { | ||
PageSetting setting = new PageSetting(); | ||
|
||
setting.setWikiAddress(portalConfig.wikiAddress()); | ||
setting.setCanAppAdminCreatePrivateNamespace(portalConfig.canAppAdminCreatePrivateNamespace()); | ||
|
||
return setting; | ||
} | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/vo/PageSetting.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.ctrip.framework.apollo.portal.entity.vo; | ||
|
||
public class PageSetting { | ||
|
||
private String wikiAddress; | ||
|
||
private boolean canAppAdminCreatePrivateNamespace; | ||
|
||
public String getWikiAddress() { | ||
return wikiAddress; | ||
} | ||
|
||
public void setWikiAddress(String wikiAddress) { | ||
this.wikiAddress = wikiAddress; | ||
} | ||
|
||
public boolean isCanAppAdminCreatePrivateNamespace() { | ||
return canAppAdminCreatePrivateNamespace; | ||
} | ||
|
||
public void setCanAppAdminCreatePrivateNamespace(boolean canAppAdminCreatePrivateNamespace) { | ||
this.canAppAdminCreatePrivateNamespace = canAppAdminCreatePrivateNamespace; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.