পরিচালিত স্টোরেজের জন্য ম্যানিফেস্ট

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

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

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

নমুনা manifest.json

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

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

Chrome তারপর অন্তর্নিহিত অপারেটিং সিস্টেম থেকে এবং সাইন-ইন করা ব্যবহারকারীদের জন্য Google Apps থেকে এই নীতিগুলি লোড করবে৷ storage.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" }
        }
      }
    }
  }
}