@@ -38,6 +38,9 @@ const LOCK_STATE_OPTIONS = [
3838// prefills the form so submitting without changes is a no-op write of current values.
3939export const CippEditSitePropertiesForm = ( { formHook, row, tenantFilter } ) => {
4040 const siteRow = Array . isArray ( row ) ? row [ 0 ] : row
41+ // Group-connected sites only accept sharing level, link defaults, lock state and storage
42+ // quota; SPO rejects Title, domain restrictions, anonymous-link override and version policy.
43+ const isGroupSite = siteRow ?. rootWebTemplate === 'Group'
4144 const propsApi = ApiGetCall ( {
4245 url : '/api/ListSiteProperties' ,
4346 data : {
@@ -99,10 +102,24 @@ export const CippEditSitePropertiesForm = ({ formHook, row, tenantFilter }) => {
99102
100103 return (
101104 < Stack spacing = { 1.5 } >
102- < Typography variant = "subtitle2" > General</ Typography >
103- < CippFormComponent type = "textField" name = "Title" label = "Site Name" formControl = { formHook } />
104-
105- < Divider />
105+ { isGroupSite && (
106+ < Alert severity = "info" >
107+ Group-connected (Team) site: only the sharing level, default link settings, lock state
108+ and storage limits can be managed here. Rename the site by renaming its M365 group.
109+ </ Alert >
110+ ) }
111+ { ! isGroupSite && (
112+ < >
113+ < Typography variant = "subtitle2" > General</ Typography >
114+ < CippFormComponent
115+ type = "textField"
116+ name = "Title"
117+ label = "Site Name"
118+ formControl = { formHook }
119+ />
120+ < Divider />
121+ </ >
122+ ) }
106123 < Typography variant = "subtitle2" > External Sharing</ Typography >
107124 < CippFormComponent
108125 type = "autoComplete"
@@ -131,15 +148,17 @@ export const CippEditSitePropertiesForm = ({ formHook, row, tenantFilter }) => {
131148 options = { LINK_PERMISSION_OPTIONS }
132149 formControl = { formHook }
133150 />
134- < CippFormComponent
135- type = "autoComplete"
136- name = "SharingDomainRestrictionMode"
137- label = "Domain Restriction"
138- multiple = { false }
139- creatable = { false }
140- options = { DOMAIN_MODE_OPTIONS }
141- formControl = { formHook }
142- />
151+ { ! isGroupSite && (
152+ < CippFormComponent
153+ type = "autoComplete"
154+ name = "SharingDomainRestrictionMode"
155+ label = "Domain Restriction"
156+ multiple = { false }
157+ creatable = { false }
158+ options = { DOMAIN_MODE_OPTIONS }
159+ formControl = { formHook }
160+ />
161+ ) }
143162 < CippFormCondition
144163 field = "SharingDomainRestrictionMode"
145164 compareType = "valueEq"
@@ -166,12 +185,14 @@ export const CippEditSitePropertiesForm = ({ formHook, row, tenantFilter }) => {
166185 formControl = { formHook }
167186 />
168187 </ CippFormCondition >
169- < CippFormComponent
170- type = "switch"
171- name = "OverrideTenantAnonymousLinkExpirationPolicy"
172- label = "Override tenant anonymous link expiration"
173- formControl = { formHook }
174- />
188+ { ! isGroupSite && (
189+ < CippFormComponent
190+ type = "switch"
191+ name = "OverrideTenantAnonymousLinkExpirationPolicy"
192+ label = "Override tenant anonymous link expiration"
193+ formControl = { formHook }
194+ />
195+ ) }
175196 < CippFormCondition
176197 field = "OverrideTenantAnonymousLinkExpirationPolicy"
177198 compareType = "is"
@@ -214,18 +235,22 @@ export const CippEditSitePropertiesForm = ({ formHook, row, tenantFilter }) => {
214235 formControl = { formHook }
215236 />
216237
217- < Divider />
218- < Typography variant = "subtitle2" > File Version Policy</ Typography >
219- < CippFormComponent
220- type = "switch"
221- name = "InheritVersionPolicyFromTenant"
222- label = "Inherit version policy from tenant"
223- formControl = { formHook }
224- />
238+ { ! isGroupSite && (
239+ < >
240+ < Divider />
241+ < Typography variant = "subtitle2" > File Version Policy</ Typography >
242+ < CippFormComponent
243+ type = "switch"
244+ name = "InheritVersionPolicyFromTenant"
245+ label = "Inherit version policy from tenant"
246+ formControl = { formHook }
247+ />
248+ </ >
249+ ) }
225250 < CippFormCondition
226251 field = "InheritVersionPolicyFromTenant"
227252 compareType = "is"
228- compareValue = { false }
253+ compareValue = { isGroupSite ? '__never__' : false }
229254 formControl = { formHook }
230255 >
231256 < CippFormComponent
0 commit comments