Hi

 

I'd like to set up a user role (Internal Admin) that can:

Create / Upadate / Delete users except system administrators.

I have activated these three operations permission:

  • CanManageAdministration
  • CanAdministratePortalUsers
  • CanManageUsers

So now it can manage all the users including the Supervisor.

Then I added the object permission for the SysAdminUnit:

 

Now from the Internal Admin user, I can see the Supervisor and edit his information including the password:

 

Any help?

 

Thank you

Mohamed

 

Like 0

Like

6 comments

Hello Mohamed,

 

Here is an example of how to permit or deny modifying the user page (UserPageV2) of system users that are system administrators (the one on the screenshot below):

To do this you need to create a replacing view model for "Edit page - User" (UserPageV2) with the code similar to the one below:

define("UserPageV2", ["RightUtilities"],
	function(RightUtilities) {
		return {
			entitySchemaName: "VwSysAdminUnit",
			attributes: {
              CanEditSystemAdministrator:{
                dataValueType: this.Terrasoft.DataValueType.BOOLEAN,
                type: this.Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
                value: true
              }
            },
			properties: {},
			mixins: {},
			diff: /**SCHEMA_DIFF*/[
              {
					"operation": "merge",
					"name": "Name",
					"parentName": "FormAuthGridLayout",
					"propertyName": "items",
					"values": {
						"enabled":{bindTo:"CanEditSystemAdministrator"}
					}
				},
              {
					"operation": "merge",
					"name": "UserPassword",
					"parentName": "FormAuthGridLayout",
					"propertyName": "items",
					"values": {
						"enabled":{bindTo:"CanEditSystemAdministrator"}
					}
				}
            ],
			methods: {
              checkIfTheUserIsASystemAdministrator: function (){
                var esq = Ext.create("Terrasoft.EntitySchemaQuery", { rootSchemaName: "SysAdminUnitInRole" });
					esq.addColumn("SysAdminUnit");
                	esq.addColumn("SysAdminUnitRoleId");
					esq.filters.addItem(esq.createColumnFilterWithParameter(3, "SysAdminUnit", this.get("PrimaryColumnValue")));
                	esq.filters.addItem(esq.createColumnFilterWithParameter(3, "SysAdminUnitRoleId", "83A43EBC-F36B-1410-298D-001E8C82BCAD"));
                	this.console.log("The Id is: "+this.get("PrimaryColumnValue"));
					esq.getEntityCollection(function (result) {
						if (result.success && result.collection.getCount() > 0) {
							result.collection.collection.each(function(item) {
                              	var collectionValue = result.collection.getByIndex(0);
                              	var actualId = collectionValue.get("Id");
								this.console.log("ESQ result: "+actualId);
                              	this.canEditRecordOperation();
                            }, this);
						}
				}, this);
              },
              init: function(){
                this.callParent(arguments);
                this.checkIfTheUserIsASystemAdministrator();
              },
              canEditRecordOperation: function(){
                var operationsToRequest = [];
                operationsToRequest.push("CanEditSystemAdministrator");
                RightUtilities.checkCanExecuteOperations(operationsToRequest, function(result) {
                    if (result) {
                        this.set("CanEditSystemAdministrator", result.CanEditSystemAdministrator);
                        console.log("Can user edit record? "+ result.CanEditSystemAdministrator);
                    }
                }, this);
              }
            }
		};
	});

You will also need to add all the fields to the schema diff to include all other fields (in my example "Username" and "Password" fields are included into the logic). Also you need to create an operation permission with the "CanEditSystemAdministrator" code. As a result each time the page is opened an ESQ query is executed to check if the system user whose page was opened is a system administrator or not (included into "System administrators" role or not).

 

As a result even if the Supervisor user is not added to the list of users in the "CanEditSystemAdministrator" system operation this user won't be able to edit "Username" or "Password" columns:

As for visibility of system administrators in the detail you mentioned or in the section grid - I believe its a complicated task and applying the method above will restrict users from editing existing records so they won't be able to do anything with system administrators records (or will be able to do that in case they are added to the system operation users list).

 

Best regards,

Oscar

Oscar Dylan,

 

I got the main idea here.

It's a UI disabling strategy to prevent field updates based on a newly created Operation Permission.

I'm concerned about a user who can hack his way with the DataService API to edit the user password and bypass the UI limitation.



What do you think?

 

Thank you

Mohamed

Mohamed Ouederni,

 

Then you need to restrict the endpoint of such a dataservice for users that shouldn't modify system users (something I've described here). Because restricting access on the application level will be a hard task (if it's even possible).

 

Best regards,

Oscar

 

Ok, I will look at this:

Oscar Dylan writes:

Then you need to restrict the endpoint of such a dataservice for users that shouldn't modify system users (something I've described here).

I don't know why it's impossible to achieve this using Creatio Access Rights System.

I thought a combination of Operation / Object / Record Permissions will solve the task.

 

Oscar Dylan writes:

Because restricting access on the application level will be a hard task (if it's even possible).

Mohamed Ouederni,

 

It's because in the base UserPageV2 the "Actions" button is removed (this code on the UserPageV2):

{
					"operation": "remove",
					"name": "actions"
				},

Also the SysAdminUnit object has no SysAaminUnitRight table (and we remember that record access rights are stored in the SysEntityNameRight table that is created upon activating records access rights). So that's why I've proposed to create a JS logic on the page that will lock all the fields and will use a system operation to manage access.

 

Best regards,

Oscar

Show all comments

Hello Colleagues,

 

I need to add a different "filter Business rule" for the same field regarding the value of another field, this is not possible using the Filter Business rule wizard, how can I did it?

 

In my case, regarding the contact Account Type I want to filter the possible Contact Types we want to enable, for example

  • if the account type is Our Company, contacts type just can be Employee,
  • if account type is Customer, contact type just could be "Customer" or "Contact Person"

 

Thanks in advance

Like 0

Like

2 comments

 Dear Julio,



Unfortunately, it is not possible to implement this logic through Business rules as we cannot create business rule for contacts in accounts.



The solution here will be to build the described filter using EntitySchemaQuery.

Here is the article - https://academy.creatio.com/docs/developer/back-end_development/working…



Best Regards,

Ivanna

Thanks Ivanna

Show all comments

Dear team

 

Today I’ve installed on production tenant the "Excel report builder" available on the marketplace.

Before installing it I tried to install on a test tenant and everything is fine.

Now, when I try to add the new section “Excel reports” to Studio workplace I receive an error on the browser console and the section doesn't appear on workplace.



Like 0

Like

5 comments

I get this often with the Excel reports builder package. Usually after logging out and back in (sometimes after a couple of times) it usually lets me add it to the workplace eventually. Not sure why this happens, but it only ever seems to happen for me with this package (and happens often with this one)

Ryan

In the mean time, you can still navigate to the Excel reports section by entering the url

/0/Nui/ViewModule.aspx#SectionModuleV2/IntExcelReportSection/

Ryan

Thank yo very much Ryan.

 

Hi Stefano,

 

To apply the changes, we recommend logging out and logging back into the application again (just like Ryan says above). If the issue persists, try adding any basic section to the workplace first, and after that add the 'Excel reports' section.

 

Hope this helps.

Thank you very much Svetlana!

The second trick has worked!

Show all comments

dear support,

 

is it possible to add some validation in account mini page using setValidationConfig() function?

I tried it but it doesn't work

Like 0

Like

1 comments

Dear all,

after some operation on my develop environment now I've two packages marked with *.

How can I resolve this issue ?

Like 0

Like

6 comments

Hello Stefano,

 

The * sign indicates that the package or scheme was changed. This parameter is set in the SysPackage or SysSchema table and the column name is "IsChanged".

 

Best regards,

Bogdan S.

Thank you Bogdan,

a clarification,

how could this have happened? I have configured a new custom package and set it as the default

Stefano Bassoli,

 

I suppose you did some changes in the website configuration that caused such behavior. Please note that this is not an error but regular OOB system logic.

 

Best regards,

Bogdan S.

In custom package appear Account

Is it possible to sanitize the issue?

Stefano Bassoli,

You can remove the object from Custom package but make sure that this object does not contain any valuable changes that must not be erased. 

 

Best regards,

Angela

Thank you Angela

I try what you suggest

Show all comments

How can I change the currency symbol displayed in dashboard ?

I just configured to Euro the Base currency settings, but it has no effect.

Like 0

Like

2 comments

Dear Stefano,

 

In order to change the dollar sign to the euro please navigate to the metric dashboard settings, click on the "How to display" tab:

 

After that please press the "Format" record and insert the euro sign in front of the {} brackets (so when you save it would look like this: €{0}).

You may see the result in the screenshot below.

Regards,

Danyil

Thank you Danyil!

Show all comments

Hello all,

 

How can I modify the page layout of a detail that isn't also a section within the Creatio mobile app? I only get the option to change how it's connected to a page. 

I need to be able to change the fields that are shown but the embedded detail won't do the trick because it's not clear on when one detail record ends and the next begins.

 

Thanks in advance for your help.

Like 0

Like

1 comments

Hello Kevin,

 

It is necessary to go to the section Page Setup, scroll down to New button, select Embedded detail option, add your detail and hit New column to add required fields. You can also the fields them in the required order there. 

 

Regards,

Dean

Show all comments

Hi,

I customized the AddressAccount entity adding a new field.

How can I import data on the new field in this entity ?

Like 0

Like

4 comments

Hi Stefano,

 

You can do it as usual - perform an import and when mapping columns just map your custom column to the column from the file.

 

Best regards,

Oscar

Oscar Dylan,

Hi Oscar

I added a new field on AddressAccount entity named region.

This new field don't appear when setting the import, see the screenshot

What Am I doing wrong ?

 

Stefano Bassoli,

 

Hello,

 

Please check if the column is present in this list:

and

and select the column. In case the column is not present then either the AccountAddress object should be published or the parent object for the replaced AccountAddress object was chosen incorectly. Please check if your parent object is the same as mine:

If it is not please remove the replaced object and replace the AccountAddress object from scratch.

 

Best regards,

Oscar

Oscar Dylan,

Thank you Oscar,

It works

Show all comments

Hi, 

I'm tryng to update an entity in a process.

I've an entity parent which has one or more child.

I need to apply a filter on a boolean field of the child entity, but when I try to select the boolean field it's missing.

What Am I doing wrong ?

Like 0

Like

2 comments

Hello Stefano,

 

Please check my screenshot below. This is the way you can build your filer on boolean field:

 

 

Best regards,

Bogdan S

Thank you!

Show all comments

Hi all,

 

We just tried installing our package on our pre-prod environment to test and unfortunately have met an error :

 

2020-10-23 10:24:19,373 System.UnauthorizedAccessException: Access to the path '_MetaInfo.json' is denied.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)

at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)

at Terrasoft.Common.IO.FileWrapper.Create(String path)

at Terrasoft.Core.ContentGeneration.ConfigurationMetaInfoFileWriter.Write(ConfigurationMetaInfo configurationMetaInfo, String configurationMetaInfoFilePath)

at Terrasoft.Core.Packages.ConfigurationAssemblyFileStorageTransaction.UpdateConfigurationVersion(Int32 version)

at Terrasoft.Core.Packages.ConfigurationAssemblyFileStorageTransaction.Commit()

at Terrasoft.Core.Packages.WorkspaceBuilder.BuildInternalNetStandard(Boolean force, BuildResultType& buildResultType)

at Terrasoft.Core.Packages.WorkspaceBuilder.Build()

at Terrasoft.Core.AppInstallation.Packages.Operations.SystemPackageOperations.Save(IEnumerable`1 packages, PackageInstallOptions options)

at Terrasoft.Core.AppInstallation.Packages.SystemPackageManager.Save(PackageInstallOptions installOptions)

at Terrasoft.Core.AppInstallation.Packages.AppInstaller.Install(String sourcePath, String destinationPath, PackageInstallOptions installOptions, IInstalledAppInfo installedAppInfo)

at Terrasoft.Core.ServiceModelContract.PackageInstaller.AppInstallerServiceInternal.<>c__DisplayClass9_0.b__0()

at Terrasoft.Core.ServiceModelContract.PackageInstaller.BaseInstallerServiceInternal.InvokeWithLogging[TResult](Func`1 action)

 

Compilation works without errors though.

 

Any ideas how to solve this ? We are on an on-prem version.

 

Thanks and lovely day !

Like 0

Like

2 comments

Dear Amandine,

 

Usually, this error means that IIS user does not have access to all paths Creatio needs to compile the application. Try to provide full access to IIS user and check if it helps by performing full compilation. 

 

Best regards,

Angela

Angela Reyes,

Hi Angela, it was indeed a permission issue, got solved the same day :) Thanks for answering !

Show all comments