স্টোরেজ এলাকায় জন্য ম্যানিফেস্ট

local এবং sync স্টোরেজ এলাকার বিপরীতে, managed সঞ্চয়স্থানের জন্য এর গঠনকে JSON স্কিমা হিসাবে ঘোষণা করা প্রয়োজন এবং Chrome দ্বারা কঠোরভাবে যাচাই করা হয়। এই স্কিমাটিকে অবশ্যই " "storage" ম্যানিফেস্ট কী-এর "managed_schema" বৈশিষ্ট্য দ্বারা নির্দেশিত একটি ফাইলে সংরক্ষণ করতে হবে এবং অ্যাপ দ্বারা সমর্থিত এন্টারপ্রাইজ নীতিগুলি ঘোষণা করে৷

নীতিগুলি বিকল্পগুলির সাথে সাদৃশ্যপূর্ণ কিন্তু ব্যবহারকারীর পরিবর্তে একটি সিস্টেম প্রশাসকের দ্বারা কনফিগার করা হয়, অ্যাপটিকে একটি প্রতিষ্ঠানের সমস্ত ব্যবহারকারীর জন্য পূর্ব-কনফিগার করার অনুমতি দেয়৷ দেখুন কিভাবে Chrome নিজেই Chrome থেকে উদাহরণগুলির জন্য নীতিগুলি পরিচালনা করে

নীতিগুলি ঘোষণা করার পরে সেগুলি store.managed API থেকে পড়া যাবে৷ অ্যাডমিনিস্ট্রেটর দ্বারা কনফিগার করা নীতিগুলি প্রয়োগ করা অ্যাপের উপর নির্ভর করে।

নমুনা manifest.json

storage.managed_schema প্রপার্টি অ্যাপের মধ্যে একটি ফাইল নির্দেশ করে যাতে নীতি স্কিমা রয়েছে।

{
  "name": "My enterprise app",
  "storage": {
    "managed_schema": "schema.json"
  },
  ...
}

Chrome তারপর অন্তর্নিহিত অপারেটিং সিস্টেম থেকে এবং সাইন-ইন করা ব্যবহারকারীদের জন্য Google Apps থেকে এই নীতিগুলি লোড করবে৷ স্টোরেজ.onChanged ইভেন্টটি যখনই কোনো নীতির পরিবর্তন শনাক্ত করা হয় তখনই বরখাস্ত করা হয়, অ্যাপটি ইভেন্ট পৃষ্ঠা ব্যবহার করলে ব্রাউজারটি চলমান না থাকা সহ। আপনি chrome://policy- এ Chrome লোড করা নীতিগুলি যাচাই করতে পারেন।

স্কিমা বিন্যাস

JSON স্কিমা ফর্ম্যাটে Chrome থেকে কিছু অতিরিক্ত প্রয়োজনীয়তা রয়েছে:

  • শীর্ষ-স্তরের স্কিমা টাইপ object থাকতে হবে।
  • শীর্ষ-স্তরের object additionalProperties থাকতে পারে না। ঘোষিত properties এই অ্যাপের নীতি।
  • প্রতিটি স্কিমার অবশ্যই একটি $ref মান বা ঠিক এক type থাকতে হবে।

যদি স্কিমাটি অবৈধ হয় তাহলে Chrome এক্সটেনশনটি লোড করবে না এবং স্কিমাটি কেন যাচাই করা হয়নি তার কারণ নির্দেশ করবে৷ যদি একটি নীতির মান স্কিমার সাথে সামঞ্জস্যপূর্ণ না হয় তবে এটি storage.managed API দ্বারা প্রকাশ করা হবে না।

নমুনা স্কিমা

{
  "type": "object",

  // "properties" maps an optional key of this object to its schema. At the
  // top-level object, these keys are the policy names supported.
  "properties": {

    // The policy name "AutoSave" is mapped to its schema, which in this case
    // declares it as a simple boolean value.
    // "title" and "description" are optional and are used to show a
    // user-friendly name and documentation to the administrator.
    "AutoSave": {
      "title": "Automatically save changes.",
      "description": "If set to true then changes will be automatically saved.",
      "type": "boolean"
    },

    // Other simple types supported include "integer", "string" and "number".
    "PollRefreshRate": {
      "type": "integer"
    },

    "DefaultServiceUrl": {
      "type": "string"
    },

    // "array" is a list of items that conform to another schema, described
    // in "items". An example to this schema is [ "one", "two" ].
    "ServiceUrls": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },

    // A more complex example that describes a list of bookmarks. Each bookmark
    // has a "title", and can have a "url" or a list of "children" bookmarks.
    // The "id" attribute is used to name a schema, and other schemas can reuse
    // it using the "$ref" attribute.
    "Bookmarks": {
      "type": "array",
      "id": "ListOfBookmarks",
      "items": {
        "type": "object",
        "properties": {
          "title": { "type": "string" },
          "url": { "type": "string" },
          "children": { "$ref": "ListOfBookmarks" }
        }
      }
    },

    // An "object" can have known properties listed as "properties", and can
    // optionally have "additionalProperties" indicating a schema to apply to
    // keys that aren't found in "properties".
    // This example policy could map a URL to its settings. An example value:
    // {
    //   "youtube.com": {
    //     "blocklisted": true
    //   },
    //   "google.com": {
    //     "bypass_proxy": true
    //   }
    // }
    "SettingsForUrls": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "blocklisted": { "type": "boolean" },
          "bypass_proxy": { "type": "boolean" }
        }
      }
    }
  }
}
,

local এবং sync স্টোরেজ এলাকার বিপরীতে, managed সঞ্চয়স্থানের জন্য এর গঠনকে JSON স্কিমা হিসাবে ঘোষণা করা প্রয়োজন এবং Chrome দ্বারা কঠোরভাবে যাচাই করা হয়। এই স্কিমাটিকে অবশ্যই " "storage" ম্যানিফেস্ট কী-এর "managed_schema" বৈশিষ্ট্য দ্বারা নির্দেশিত একটি ফাইলে সংরক্ষণ করতে হবে এবং অ্যাপ দ্বারা সমর্থিত এন্টারপ্রাইজ নীতিগুলি ঘোষণা করে৷

নীতিগুলি বিকল্পগুলির সাথে সাদৃশ্যপূর্ণ কিন্তু ব্যবহারকারীর পরিবর্তে একটি সিস্টেম প্রশাসকের দ্বারা কনফিগার করা হয়, অ্যাপটিকে একটি প্রতিষ্ঠানের সমস্ত ব্যবহারকারীর জন্য পূর্ব-কনফিগার করার অনুমতি দেয়৷ দেখুন কিভাবে Chrome নিজেই Chrome থেকে উদাহরণগুলির জন্য নীতিগুলি পরিচালনা করে

নীতিগুলি ঘোষণা করার পরে সেগুলি store.managed API থেকে পড়া যাবে৷ অ্যাডমিনিস্ট্রেটর দ্বারা কনফিগার করা নীতিগুলি প্রয়োগ করা অ্যাপের উপর নির্ভর করে।

নমুনা manifest.json

storage.managed_schema প্রপার্টি অ্যাপের মধ্যে একটি ফাইল নির্দেশ করে যাতে নীতি স্কিমা রয়েছে।

{
  "name": "My enterprise app",
  "storage": {
    "managed_schema": "schema.json"
  },
  ...
}

Chrome তারপর অন্তর্নিহিত অপারেটিং সিস্টেম থেকে এবং সাইন-ইন করা ব্যবহারকারীদের জন্য Google Apps থেকে এই নীতিগুলি লোড করবে৷ স্টোরেজ.onChanged ইভেন্টটি যখনই কোনো নীতির পরিবর্তন শনাক্ত করা হয় তখনই বরখাস্ত করা হয়, অ্যাপটি ইভেন্ট পৃষ্ঠা ব্যবহার করলে ব্রাউজারটি চলমান না থাকা সহ। আপনি chrome://policy- এ Chrome লোড করা নীতিগুলি যাচাই করতে পারেন।

স্কিমা বিন্যাস

JSON স্কিমা ফর্ম্যাটে Chrome থেকে কিছু অতিরিক্ত প্রয়োজনীয়তা রয়েছে:

  • শীর্ষ-স্তরের স্কিমা টাইপ object থাকতে হবে।
  • শীর্ষ-স্তরের object additionalProperties থাকতে পারে না। ঘোষিত properties এই অ্যাপের নীতি।
  • প্রতিটি স্কিমার অবশ্যই একটি $ref মান বা ঠিক এক type থাকতে হবে।

যদি স্কিমাটি অবৈধ হয় তাহলে Chrome এক্সটেনশনটি লোড করবে না এবং স্কিমাটি কেন যাচাই করা হয়নি তার কারণ নির্দেশ করবে৷ যদি একটি নীতির মান স্কিমার সাথে সামঞ্জস্যপূর্ণ না হয় তবে এটি storage.managed API দ্বারা প্রকাশ করা হবে না।

নমুনা স্কিমা

{
  "type": "object",

  // "properties" maps an optional key of this object to its schema. At the
  // top-level object, these keys are the policy names supported.
  "properties": {

    // The policy name "AutoSave" is mapped to its schema, which in this case
    // declares it as a simple boolean value.
    // "title" and "description" are optional and are used to show a
    // user-friendly name and documentation to the administrator.
    "AutoSave": {
      "title": "Automatically save changes.",
      "description": "If set to true then changes will be automatically saved.",
      "type": "boolean"
    },

    // Other simple types supported include "integer", "string" and "number".
    "PollRefreshRate": {
      "type": "integer"
    },

    "DefaultServiceUrl": {
      "type": "string"
    },

    // "array" is a list of items that conform to another schema, described
    // in "items". An example to this schema is [ "one", "two" ].
    "ServiceUrls": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },

    // A more complex example that describes a list of bookmarks. Each bookmark
    // has a "title", and can have a "url" or a list of "children" bookmarks.
    // The "id" attribute is used to name a schema, and other schemas can reuse
    // it using the "$ref" attribute.
    "Bookmarks": {
      "type": "array",
      "id": "ListOfBookmarks",
      "items": {
        "type": "object",
        "properties": {
          "title": { "type": "string" },
          "url": { "type": "string" },
          "children": { "$ref": "ListOfBookmarks" }
        }
      }
    },

    // An "object" can have known properties listed as "properties", and can
    // optionally have "additionalProperties" indicating a schema to apply to
    // keys that aren't found in "properties".
    // This example policy could map a URL to its settings. An example value:
    // {
    //   "youtube.com": {
    //     "blocklisted": true
    //   },
    //   "google.com": {
    //     "bypass_proxy": true
    //   }
    // }
    "SettingsForUrls": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "blocklisted": { "type": "boolean" },
          "bypass_proxy": { "type": "boolean" }
        }
      }
    }
  }
}