Skip to content

Commit

Permalink
Request Permissions mechanism improvements (#75)
Browse files Browse the repository at this point in the history
* Add 'done' field for request form in DB

* Add timestamp of current request and bump patch number

* Add request type to request document and allow multiple requests

* Fix coding style

* Bump patch number and fix coding style

* Fix review comments

* Bump version

Co-authored-by: Ioana Alexandru <[email protected]>
  • Loading branch information
ericpostolache and IoanaAlexandru authored Oct 12, 2020
1 parent d0af893 commit 6f2682c
Show file tree
Hide file tree
Showing 16 changed files with 376 additions and 276 deletions.
468 changes: 255 additions & 213 deletions ios/Podfile.lock

Large diffs are not rendered by default.

60 changes: 30 additions & 30 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
151803A2442DD69DCBBE7F00 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6047ACBF1B75C3FD6F95F0D2 /* Pods_Runner.framework */; };
19E6F50B23F5AB7E00B39D95 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 19E6F50A23F5AB7E00B39D95 /* GoogleService-Info.plist */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
FBBA8F9A35A44F8102D5EAEF /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05B57303C999713E350DFBFF /* Pods_Runner.framework */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -31,32 +31,32 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
05B57303C999713E350DFBFF /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
19E6F50A23F5AB7E00B39D95 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
27A0B885ED0100362864369D /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
31C476B79716C570ABA13B6C /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
6047ACBF1B75C3FD6F95F0D2 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
429BEEBA566683292754D771 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
70587A55630AD8CC3382BF34 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
8FD158BF6838EC9172E0B63C /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
CBCFF1FC2921391693903AA7 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
151803A2442DD69DCBBE7F00 /* Pods_Runner.framework in Frameworks */,
FBBA8F9A35A44F8102D5EAEF /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -66,9 +66,9 @@
0F56ECAB836BA28A28176D92 /* Pods */ = {
isa = PBXGroup;
children = (
CBCFF1FC2921391693903AA7 /* Pods-Runner.debug.xcconfig */,
27A0B885ED0100362864369D /* Pods-Runner.release.xcconfig */,
8FD158BF6838EC9172E0B63C /* Pods-Runner.profile.xcconfig */,
429BEEBA566683292754D771 /* Pods-Runner.debug.xcconfig */,
70587A55630AD8CC3382BF34 /* Pods-Runner.release.xcconfig */,
31C476B79716C570ABA13B6C /* Pods-Runner.profile.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
Expand All @@ -91,7 +91,7 @@
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
0F56ECAB836BA28A28176D92 /* Pods */,
FE67460CBA1E18E8DD42F4A3 /* Frameworks */,
D6374C883D6829220B9C29F4 /* Frameworks */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -127,10 +127,10 @@
name = "Supporting Files";
sourceTree = "<group>";
};
FE67460CBA1E18E8DD42F4A3 /* Frameworks */ = {
D6374C883D6829220B9C29F4 /* Frameworks */ = {
isa = PBXGroup;
children = (
6047ACBF1B75C3FD6F95F0D2 /* Pods_Runner.framework */,
05B57303C999713E350DFBFF /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand All @@ -142,14 +142,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
887B6388E6F0A493E9ECA89D /* [CP] Check Pods Manifest.lock */,
3CD3D192A3A8E058719A1C7E /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
DDC0F4BFA3CF2DE9E611D987 /* [CP] Embed Pods Frameworks */,
4C12723D319BC541FA394731 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -225,7 +225,7 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
887B6388E6F0A493E9ECA89D /* [CP] Check Pods Manifest.lock */ = {
3CD3D192A3A8E058719A1C7E /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand All @@ -247,21 +247,7 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
DDC0F4BFA3CF2DE9E611D987 /* [CP] Embed Pods Frameworks */ = {
4C12723D319BC541FA394731 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand Down Expand Up @@ -311,6 +297,20 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down
3 changes: 2 additions & 1 deletion lib/generated/intl/messages_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ class MessageLookup extends MessageLookupByLibrary {
"messageAccountDeleted" : MessageLookupByLibrary.simpleMessage("Account deleted successfully."),
"messageAddCustomWebsite" : MessageLookupByLibrary.simpleMessage("Try adding a custom website."),
"messageAgreePermissions" : MessageLookupByLibrary.simpleMessage("I will only upload information that is correct and accurate, to the best of my knowledge. I understand that submitting erroneous or offensive information on purpose will lead to my editing permissions being permanently revoked."),
"messageAnnouncedOnMail" : MessageLookupByLibrary.simpleMessage("You will receive a mail confirmation if your request is approved."),
"messageAskPermissionToEdit" : MessageLookupByLibrary.simpleMessage("Why do you want edit permissions for ACS UPB Mobile?"),
"messageButtonAbove" : MessageLookupByLibrary.simpleMessage("button above"),
"messageCannotBeUndone" : MessageLookupByLibrary.simpleMessage("This action cannot be undone."),
Expand All @@ -181,7 +182,7 @@ class MessageLookup extends MessageLookupByLibrary {
"messageNewUser" : MessageLookupByLibrary.simpleMessage("New user?"),
"messageNoClassesYet" : MessageLookupByLibrary.simpleMessage("You have not added any classes yet."),
"messageNotLoggedIn" : MessageLookupByLibrary.simpleMessage("You need to be logged in to perform this action."),
"messageRequestAlreadyExists" : MessageLookupByLibrary.simpleMessage("You have already submitted a request. If you want to overwrite it, please press \'Send\'."),
"messageRequestAlreadyExists" : MessageLookupByLibrary.simpleMessage("You have already submitted a request. If you want to add another one, please press \'Send\'."),
"messageRequestHasBeenSent" : MessageLookupByLibrary.simpleMessage("The request has been sent succesfully."),
"messageResetPassword" : MessageLookupByLibrary.simpleMessage("Enter your e-mai in order to receive instructions on how to reset your password."),
"messageShortcutDeleted" : MessageLookupByLibrary.simpleMessage("Shortcut deleted successfully."),
Expand Down
3 changes: 2 additions & 1 deletion lib/generated/intl/messages_ro.dart
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ class MessageLookup extends MessageLookupByLibrary {
"messageAccountDeleted" : MessageLookupByLibrary.simpleMessage("Contul a fost șters cu succes."),
"messageAddCustomWebsite" : MessageLookupByLibrary.simpleMessage("Încercați să adăugați un website."),
"messageAgreePermissions" : MessageLookupByLibrary.simpleMessage("Voi încărca doar informații corecte si precise. Înțeleg că încărcarea informațiilor eronate sau ofensatoare în mod intenționat va conduce la blocarea permisiunilor mele permanent."),
"messageAnnouncedOnMail" : MessageLookupByLibrary.simpleMessage("Veți primi o confirmare pe mail dacă vi se acceptă cererea."),
"messageAskPermissionToEdit" : MessageLookupByLibrary.simpleMessage("De ce dorești să primești permisiuni de editare în ACS UPB Mobile?"),
"messageButtonAbove" : MessageLookupByLibrary.simpleMessage("de mai sus."),
"messageCannotBeUndone" : MessageLookupByLibrary.simpleMessage("Această acțiune nu este reversibilă."),
Expand All @@ -181,7 +182,7 @@ class MessageLookup extends MessageLookupByLibrary {
"messageNewUser" : MessageLookupByLibrary.simpleMessage("Utilizator nou?"),
"messageNoClassesYet" : MessageLookupByLibrary.simpleMessage("Nu ați adăugat nici o materie încă."),
"messageNotLoggedIn" : MessageLookupByLibrary.simpleMessage("Trebuie să fiți autentificat pentru a realiza această acțiune."),
"messageRequestAlreadyExists" : MessageLookupByLibrary.simpleMessage("Ați trimis deja o cerere. Daca doriți să o suprascrieți, vă rugăm sa apasați \'Salvare\'."),
"messageRequestAlreadyExists" : MessageLookupByLibrary.simpleMessage("Ați trimis deja o cerere. Daca doriți să adăugați una nouă, vă rugăm sa apasați \'Salvare\'."),
"messageRequestHasBeenSent" : MessageLookupByLibrary.simpleMessage("Cererea a fost transmisă cu succes"),
"messageResetPassword" : MessageLookupByLibrary.simpleMessage("Introduceți mail-ul pentru a primi instrucțiuni de resetare a parolei."),
"messageShortcutDeleted" : MessageLookupByLibrary.simpleMessage("Scurtătura a fost ștearsă cu succes."),
Expand Down
14 changes: 12 additions & 2 deletions lib/generated/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@
"messageEmailNotVerifiedToPerformAction": "Your account needs to be verified to perform this action.",
"messageAccountCreated": "Account created successfully.",
"messageAccountDeleted": "Account deleted successfully.",
"messageAnnouncedOnMail": "You will receive a mail confirmation if your request is approved.",
"messageCheckEmailVerification": "Please check your email for account verification.",
"messageResetPassword": "Enter your e-mai in order to receive instructions on how to reset your password.",
"messageDeleteAccount": "Are you sure you want to delete your account?",
Expand All @@ -227,7 +228,7 @@
"messageButtonAbove": "button above",
"messageAskPermissionToEdit": "Why do you want edit permissions for ACS UPB Mobile?",
"messageRequestHasBeenSent": "The request has been sent succesfully.",
"messageRequestAlreadyExists": "You have already submitted a request. If you want to overwrite it, please press 'Send'.",
"messageRequestAlreadyExists": "You have already submitted a request. If you want to add another one, please press 'Send'.",
"messageIAgreeToThe": "I agree to the ",
"messageEditProfileSuccess": "Profile updated successfully.",
"messageTapForMoreInfo": "Tap for more info",
Expand Down
3 changes: 2 additions & 1 deletion lib/l10n/intl_ro.arb
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@
"messageEmailNotVerifiedToPerformAction": "Contul trebuie să fie verificat pentru a realiza această acțiune.",
"messageAccountCreated": "Contul a fost creat cu succes.",
"messageAccountDeleted": "Contul a fost șters cu succes.",
"messageAnnouncedOnMail": "Veți primi o confirmare pe mail dacă vi se acceptă cererea.",
"messageCheckEmailVerification": "Verificați-vă mail-ul pentru confirmarea contului.",
"messageResetPassword": "Introduceți mail-ul pentru a primi instrucțiuni de resetare a parolei.",
"messageDeleteAccount": "Sunteți sigur că doriți să ștergeți contul?",
Expand All @@ -227,7 +228,7 @@
"messageButtonAbove": "de mai sus.",
"messageAskPermissionToEdit": "De ce dorești să primești permisiuni de editare în ACS UPB Mobile?",
"messageRequestHasBeenSent": "Cererea a fost transmisă cu succes",
"messageRequestAlreadyExists": "Ați trimis deja o cerere. Daca doriți să o suprascrieți, vă rugăm sa apasați 'Salvare'.",
"messageRequestAlreadyExists": "Ați trimis deja o cerere. Daca doriți să adăugați una nouă, vă rugăm sa apasați 'Salvare'.",
"messageIAgreeToThe": "Sunt de acord cu ",
"messageEditProfileSuccess": "Profilul a fost actualizat cu succes.",
"messageTapForMoreInfo": "Apasă pentru mai multe informații",
Expand Down
3 changes: 2 additions & 1 deletion lib/pages/classes/service/class_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:acs_upb_mobile/authentication/model/user.dart';
import 'package:acs_upb_mobile/generated/l10n.dart';
import 'package:acs_upb_mobile/pages/classes/model/class.dart';
import 'package:acs_upb_mobile/pages/filter/model/filter.dart';
import 'package:acs_upb_mobile/resources/utils.dart';
import 'package:acs_upb_mobile/widgets/toast.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -29,7 +30,7 @@ extension ShortcutTypeExtension on ShortcutType {
extension ShortcutExtension on Shortcut {
Map<String, dynamic> toData() {
return {
'type': type.toString().split('.').last,
'type': type.toShortString(),
'name': name,
'link': link,
'addedBy': ownerUid
Expand Down
Loading

0 comments on commit 6f2682c

Please sign in to comment.