Skip to content

Commit

Permalink
permission upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
helmus committed Oct 9, 2017
1 parent ed9aec5 commit b8e906e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jira-plugin/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Jira HotLinker",
"description": "Jira HotLinker, quick access to Jira metadata when hovering over ticket numbers!",
"version": "1.5.0",
"version": "1.5.1",
"manifest_version": 2,
"icons": {
"128": "resources/jiralink128.png"
Expand Down
3 changes: 2 additions & 1 deletion jira-plugin/options/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export default {
domains: [
'*://github.com/*'
],
instanceUrl: ''
instanceUrl: '',
v15upgrade: false
};

8 changes: 7 additions & 1 deletion jira-plugin/options/options.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async function saveOptions() {
}

if (granted) {
await storageSet({instanceUrl, domains});
await storageSet({instanceUrl, domains, v15upgrade:true});
resetDeclarativeMapping();
status.innerHTML = '<br />Options saved.';
setTimeout(function () {
Expand All @@ -67,6 +67,12 @@ async function main() {
function ConfigPage(props) {
return (
<div>
{(() => {
if (!props.v15upgrade) {
return (<label className='upgradeWarning'>Please click save to activate the new ( reduced ) permissions !
<br/><br/></label>);
}
})()}
<label>
Your full Jira instance url: <br/>
<input
Expand Down
3 changes: 3 additions & 0 deletions jira-plugin/options/options.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ textarea {
line-height: $base + 1;
padding: 1px 5px;
height: 20 * 7 + 6px;
}
.upgradeWarning {
color: #dd445c;
}
2 changes: 1 addition & 1 deletion jira-plugin/src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const executeScript = promisifyChrome(chrome.tabs, 'executeScript');
(function () {
chrome.runtime.onInstalled.addListener(async () => {
const config = await storageGet(defaultConfig);
if (!config.instanceUrl) {
if (!config.instanceUrl || !config.v15upgrade) {
chrome.runtime.openOptionsPage();
return;
}
Expand Down

0 comments on commit b8e906e

Please sign in to comment.